aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 04ce1dc2..cc5d8739 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -38,6 +38,7 @@
# include "e2ee/qolmaccount.h"
# include "e2ee/qolmutils.h"
# include "database.h"
+# include "e2ee/qolminboundsession.h"
#if QT_VERSION_MAJOR >= 6
# include <qt6keychain/keychain.h>
@@ -2120,4 +2121,14 @@ Database* Connection::database()
{
return d->database;
}
+
+UnorderedMap<QPair<QString, QString>, QOlmInboundGroupSessionPtr> Connection::loadRoomMegolmSessions(Room* room)
+{
+ return database()->loadMegolmSessions(room->id(), picklingMode());
+}
+
+void Connection::saveMegolmSession(Room* room, const QString& senderKey, QOlmInboundGroupSession* session)
+{
+ database()->saveMegolmSession(room->id(), senderKey, session->sessionId(), session->pickle(picklingMode()));
+}
#endif