aboutsummaryrefslogtreecommitdiff
path: root/lib/database.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-04-16 22:23:53 +0200
committerGitHub <noreply@github.com>2022-04-16 22:23:53 +0200
commit87e8d6d6ef325f176a7d3b5da441569f9b24c847 (patch)
tree671133c8974569b182a27d82d627929addeb5ad6 /lib/database.h
parentfc3ad90a054e3c674127a0cdd385ddbb98cf2010 (diff)
parentc0c4cd014718fdb54ee691ccbdab46981e15d25f (diff)
downloadlibquotient-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.h7
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;
};
}