Merge pull request #2013 from famedly/krille/fix-megolm-sessions-invalid-after-restart

fix: Megolm sessions become invalid after restarting client
This commit is contained in:
Krille-chan 2025-02-04 10:15:36 +01:00 committed by GitHub
commit 51b10057f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -289,8 +289,7 @@ class KeyManager {
dbSess.sessionId != sessionId) {
return null;
}
roomInboundGroupSessions[sessionId] = dbSess;
return sess;
return roomInboundGroupSessions[sessionId] = dbSess;
}
Map<String, Map<String, bool>> _getDeviceKeyIdMap(
@ -348,6 +347,8 @@ class KeyManager {
sess.outboundGroupSession!.session_id(),
);
if (inboundSess == null) {
Logs().w('No inbound megolm session found for outbound session!');
assert(inboundSess != null);
wipe = true;
}