diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-03-10 07:21:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 07:21:01 +0100 |
commit | b865be5ad72b3996bf072268d061d7466bf4623a (patch) | |
tree | 99326e678b29fec8004734a6a11ef17e842785f6 /lib/room.cpp | |
parent | 3cf68a084ea5bff20129222867a399b05e6e0bd6 (diff) | |
parent | b8c22ff0663350a019ae918771fac4b6447d2b09 (diff) | |
download | libquotient-b865be5ad72b3996bf072268d061d7466bf4623a.tar.gz libquotient-b865be5ad72b3996bf072268d061d7466bf4623a.zip |
Merge pull request #541 from TobiasFella/storesessionedkey
Store some more things in the database
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 6197b3a2..88aa1d07 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -341,7 +341,7 @@ public: UnorderedMap<std::pair<QString, QString>, QOlmInboundGroupSessionPtr> groupSessions; bool addInboundGroupSession(QString senderKey, QString sessionId, - QString sessionKey) + QString sessionKey, QString ed25519Key) { if (groupSessions.find({senderKey, sessionId}) != groupSessions.end()) { qCWarning(E2EE) << "Inbound Megolm session" << sessionId @@ -356,7 +356,7 @@ public: return false; } qCWarning(E2EE) << "Adding inbound session"; - connection->saveMegolmSession(q, senderKey, megolmSession.get()); + connection->saveMegolmSession(q, senderKey, megolmSession.get(), ed25519Key); groupSessions[{senderKey, sessionId}] = std::move(megolmSession); return true; } @@ -1509,7 +1509,7 @@ void Room::handleRoomKeyEvent(const RoomKeyEvent& roomKeyEvent, << roomKeyEvent.algorithm() << "in m.room_key event"; } if (d->addInboundGroupSession(senderKey, roomKeyEvent.sessionId(), - roomKeyEvent.sessionKey())) { + roomKeyEvent.sessionKey(), roomKeyEvent.fullJson()["keys"]["ed25519"].toString())) { qCWarning(E2EE) << "added new inboundGroupSession:" << d->groupSessions.size(); for (const auto& eventId : d->undecryptedEvents[roomKeyEvent.sessionId()]) { |