forked from Mirrors/gomuks
hicli/sync: ignore m.unavailable withheld events from own devices
This commit is contained in:
parent
91fa59d5ba
commit
014c63f0e7
1 changed files with 6 additions and 1 deletions
|
@ -82,7 +82,12 @@ func (h *HiClient) preProcessSyncResponse(ctx context.Context, resp *mautrix.Res
|
||||||
case *event.EncryptedEventContent:
|
case *event.EncryptedEventContent:
|
||||||
h.Crypto.HandleEncryptedEvent(ctx, evt)
|
h.Crypto.HandleEncryptedEvent(ctx, evt)
|
||||||
case *event.RoomKeyWithheldEventContent:
|
case *event.RoomKeyWithheldEventContent:
|
||||||
|
// TODO move this check to mautrix-go?
|
||||||
|
if evt.Sender == h.Account.UserID && content.Code == event.RoomKeyWithheldUnavailable {
|
||||||
|
log.Debug().Any("withheld_content", content).Msg("Ignoring m.unavailable megolm session withheld event")
|
||||||
|
} else {
|
||||||
h.Crypto.HandleRoomKeyWithheld(ctx, content)
|
h.Crypto.HandleRoomKeyWithheld(ctx, content)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
postponedToDevices = append(postponedToDevices, evt)
|
postponedToDevices = append(postponedToDevices, evt)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue