mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
crypto/keyimport: call session received callback for all sessions in import
Some checks failed
Some checks failed
This commit is contained in:
parent
a55693bbd7
commit
a1236b65be
1 changed files with 3 additions and 1 deletions
|
|
@ -120,7 +120,9 @@ func (mach *OlmMachine) importExportedRoomKey(ctx context.Context, session Expor
|
|||
existingIGS, _ := mach.CryptoStore.GetGroupSession(ctx, igs.RoomID, igs.ID())
|
||||
firstKnownIndex := igs.Internal.FirstKnownIndex()
|
||||
if existingIGS != nil && existingIGS.Internal.FirstKnownIndex() <= firstKnownIndex {
|
||||
// We already have an equivalent or better session in the store, so don't override it.
|
||||
// We already have an equivalent or better session in the store, so don't override it,
|
||||
// but do notify the session received callback just in case.
|
||||
mach.MarkSessionReceived(ctx, session.RoomID, igs.ID(), existingIGS.Internal.FirstKnownIndex())
|
||||
return false, nil
|
||||
}
|
||||
err = mach.CryptoStore.PutGroupSession(ctx, igs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue