Ignore conflicts when inserting withheld group sessions

This commit is contained in:
Tulir Asokan 2024-05-26 18:27:48 +03:00
commit 0b07ae9942
2 changed files with 6 additions and 2 deletions

View file

@ -638,6 +638,7 @@ func (mach *OlmMachine) HandleRoomKeyWithheld(ctx context.Context, content *even
zerolog.Ctx(ctx).Debug().Interface("content", content).Msg("Non-megolm room key withheld event")
return
}
// TODO log if there's a conflict? (currently ignored)
err := mach.CryptoStore.PutWithheldGroupSession(ctx, *content)
if err != nil {
zerolog.Ctx(ctx).Error().Err(err).Msg("Failed to save room key withheld event")