diff options
author | Tobias Fella <fella@posteo.de> | 2022-03-02 23:56:52 +0100 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2022-03-10 19:50:47 +0100 |
commit | 30004d4e0d6aca06491777f77ed966a451eff50f (patch) | |
tree | c4c7304802f4cd999d628b0263ff58b6cf4e43a8 /lib/connection.h | |
parent | 658e6db49364862be1ab8e264b03dc04a7bed721 (diff) | |
download | libquotient-30004d4e0d6aca06491777f77ed966a451eff50f.tar.gz libquotient-30004d4e0d6aca06491777f77ed966a451eff50f.zip |
Save and load outgoing megolm session
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/connection.h b/lib/connection.h index 5ea7c5f1..6f75b068 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -25,6 +25,7 @@ #ifdef Quotient_E2EE_ENABLED #include "e2ee/e2ee.h" #include "e2ee/qolmmessage.h" +#include "e2ee/qolmoutboundsession.h" #endif Q_DECLARE_METATYPE(Quotient::GetLoginFlowsJob::LoginFlow) @@ -322,6 +323,10 @@ public: void saveMegolmSession(Room* room, const QString& senderKey, QOlmInboundGroupSession* session, const QString& ed25519Key); bool hasOlmSession(User* user, const QString& deviceId) const; + QOlmOutboundGroupSessionPtr loadCurrentOutboundMegolmSession(Room* room); + void saveCurrentOutboundMegolmSession(Room *room, const QOlmOutboundGroupSessionPtr& data); + + //This currently assumes that an olm session with (user, device) exists //TODO make this return an event? QPair<QOlmMessage::Type, QByteArray> olmEncryptMessage(User* user, const QString& device, const QByteArray& message); |