mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
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:
|
||||
h.Crypto.HandleEncryptedEvent(ctx, evt)
|
||||
case *event.RoomKeyWithheldEventContent:
|
||||
h.Crypto.HandleRoomKeyWithheld(ctx, content)
|
||||
// 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)
|
||||
}
|
||||
default:
|
||||
postponedToDevices = append(postponedToDevices, evt)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue