aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2022-06-01 23:32:16 +0200
committerTobias Fella <fella@posteo.de>2022-06-01 23:32:16 +0200
commit46ed9cc3336231d418449046ff5486b7abc9c925 (patch)
tree83fc989dfcc45fbea1aa359d929f6c2695706f17
parent6c735f9f55b936e9de1497c2f5896f0a018d4227 (diff)
downloadlibquotient-46ed9cc3336231d418449046ff5486b7abc9c925.tar.gz
libquotient-46ed9cc3336231d418449046ff5486b7abc9c925.zip
Immediately create a new megolm session when user leaves instead of
deferring until sending event
-rw-r--r--lib/room.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index c745975f..9e2a5053 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -521,7 +521,9 @@ Room::Room(Connection* connection, QString id, JoinState initialJoinState)
if (!usesEncryption()) {
return;
}
- d->currentOutboundMegolmSession = nullptr;
+ if (d->hasValidMegolmSession()) {
+ d->createMegolmSession();
+ }
qCDebug(E2EE) << "Invalidating current megolm session because user left";
});