diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-04-16 22:23:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 22:23:53 +0200 |
commit | 87e8d6d6ef325f176a7d3b5da441569f9b24c847 (patch) | |
tree | 671133c8974569b182a27d82d627929addeb5ad6 /lib/database.h | |
parent | fc3ad90a054e3c674127a0cdd385ddbb98cf2010 (diff) | |
parent | c0c4cd014718fdb54ee691ccbdab46981e15d25f (diff) | |
download | libquotient-87e8d6d6ef325f176a7d3b5da441569f9b24c847.tar.gz libquotient-87e8d6d6ef325f176a7d3b5da441569f9b24c847.zip |
Merge pull request #544 from TobiasFella/checkedkey
Check edKey when receiving an olm message and prepare for MSC 3700
Diffstat (limited to 'lib/database.h')
-rw-r--r-- | lib/database.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/database.h b/lib/database.h index cf241dbc..08fe49f3 100644 --- a/lib/database.h +++ b/lib/database.h @@ -8,7 +8,6 @@ #include <QtCore/QVector> #include "e2ee/e2ee.h" - namespace Quotient { class QUOTIENT_API Database : public QObject { @@ -29,8 +28,8 @@ public: void clear(); void saveOlmSession(const QString& senderKey, const QString& sessionId, const QByteArray &pickle, const QDateTime& timestamp); UnorderedMap<QString, std::vector<QOlmSessionPtr>> loadOlmSessions(const PicklingMode& picklingMode); - UnorderedMap<std::pair<QString, QString>, QOlmInboundGroupSessionPtr> loadMegolmSessions(const QString& roomId, const PicklingMode& picklingMode); - void saveMegolmSession(const QString& roomId, const QString& senderKey, const QString& sessionKey, const QString& ed25519Key, const QByteArray& pickle); + UnorderedMap<QString, QOlmInboundGroupSessionPtr> loadMegolmSessions(const QString& roomId, const PicklingMode& picklingMode); + void saveMegolmSession(const QString& roomId, const QString& sessionId, const QByteArray& pickle, const QString& senderId, const QString& olmSessionId); void addGroupSessionIndexRecord(const QString& roomId, const QString& sessionId, uint32_t index, const QString& eventId, qint64 ts); std::pair<QString, qint64> groupSessionIndexRecord(const QString& roomId, const QString& sessionId, qint64 index); void clearRoomData(const QString& roomId); @@ -39,6 +38,8 @@ public: private: void migrateTo1(); void migrateTo2(); + void migrateTo3(); + QString m_matrixId; }; } |