summary refs log tree commit diff
path: root/src/Cache_p.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-30 00:26:27 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-30 01:54:53 +0100
commit2ce129e6b61d18ac4a2e79702d3c1fd1302c6631 (patch)
tree4cab52d78c428bbebc9c854c2019e7b0fc3b71d4 /src/Cache_p.h
parentRemove outbound session storage (diff)
downloadnheko-2ce129e6b61d18ac4a2e79702d3c1fd1302c6631.tar.xz
Properly share and rotate sessions on member and device changes
Diffstat (limited to 'src/Cache_p.h')
-rw-r--r--src/Cache_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Cache_p.h b/src/Cache_p.h
index f8c4ceaf..fab2d964 100644
--- a/src/Cache_p.h
+++ b/src/Cache_p.h
@@ -59,6 +59,8 @@ public:
 
         // user cache stores user keys
         std::optional<UserKeyCache> userKeys(const std::string &user_id);
+        std::map<std::string, std::optional<UserKeyCache>> getMembersWithKeys(
+          const std::string &room_id);
         void updateUserKeys(const std::string &sync_token,
                             const mtx::responses::QueryKeys &keyQuery);
         void markUserKeysOutOfDate(lmdb::txn &txn,
@@ -232,10 +234,11 @@ public:
         //
         void saveOutboundMegolmSession(const std::string &room_id,
                                        const OutboundGroupSessionData &data,
-                                       mtx::crypto::OutboundGroupSessionPtr session);
+                                       mtx::crypto::OutboundGroupSessionPtr &session);
         OutboundGroupSessionDataRef getOutboundMegolmSession(const std::string &room_id);
         bool outboundMegolmSessionExists(const std::string &room_id) noexcept;
         void updateOutboundMegolmSession(const std::string &room_id,
+                                         const OutboundGroupSessionData &data,
                                          mtx::crypto::OutboundGroupSessionPtr &session);
         void dropOutboundMegolmSession(const std::string &room_id);