Skip to content

Commit

Permalink
Merge pull request #2013 from famedly/krille/fix-megolm-sessions-inva…
Browse files Browse the repository at this point in the history
…lid-after-restart

fix: Megolm sessions become invalid after restarting client
  • Loading branch information
krille-chan authored Feb 4, 2025
2 parents 0874488 + 6cd40d3 commit 51b1005
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/encryption/key_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 51b1005

Please sign in to comment.