From 6f5ac9b7315d75692960e5eac7b1eb6867c0d203 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sun, 6 Mar 2022 22:54:01 +0100 Subject: Keep log of where we send keys and send keys to new devices and users --- lib/database.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/database.h') diff --git a/lib/database.h b/lib/database.h index 751ebd1d..30f2f203 100644 --- a/lib/database.h +++ b/lib/database.h @@ -7,9 +7,14 @@ #include #include +#include + #include "e2ee/e2ee.h" namespace Quotient { +class User; +class Room; + class QUOTIENT_API Database : public QObject { Q_OBJECT @@ -38,6 +43,10 @@ public: QOlmOutboundGroupSessionPtr loadCurrentOutboundMegolmSession(const QString& roomId, const PicklingMode& picklingMode); void saveCurrentOutboundMegolmSession(const QString& roomId, const PicklingMode& picklingMode, const QOlmOutboundGroupSessionPtr& data); + // Returns a map User -> [Device] that have not received key yet + QHash devicesWithoutKey(Room* room, const QString &sessionId); + void setDevicesReceivedKey(const QString& roomId, QHash devices, const QString& sessionId, int index); + private: void migrateTo1(); void migrateTo2(); -- cgit v1.2.3