mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
hicli/sync: fix unredacting content of encrypted events
This commit is contained in:
parent
a14f01a3ec
commit
bd2ece9ff2
1 changed files with 1 additions and 1 deletions
|
@ -621,7 +621,7 @@ func (h *HiClient) processEvent(
|
||||||
}
|
}
|
||||||
var decryptionErr error
|
var decryptionErr error
|
||||||
var decryptedMautrixEvt *event.Event
|
var decryptedMautrixEvt *event.Event
|
||||||
if evt.Type == event.EventEncrypted && dbEvt.RedactedBy == "" {
|
if evt.Type == event.EventEncrypted && (dbEvt.RedactedBy == "" || len(dbEvt.Content) > 2) {
|
||||||
decryptedMautrixEvt, decryptionErr = h.decryptEventInto(ctx, evt, dbEvt)
|
decryptedMautrixEvt, decryptionErr = h.decryptEventInto(ctx, evt, dbEvt)
|
||||||
} else if evt.Type == event.EventRedaction {
|
} else if evt.Type == event.EventRedaction {
|
||||||
if evt.Redacts != "" && gjson.GetBytes(evt.Content.VeryRaw, "redacts").Str != evt.Redacts.String() {
|
if evt.Redacts != "" && gjson.GetBytes(evt.Content.VeryRaw, "redacts").Str != evt.Redacts.String() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue