From 2ce129e6b61d18ac4a2e79702d3c1fd1302c6631 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 30 Nov 2020 00:26:27 +0100 Subject: Properly share and rotate sessions on member and device changes --- src/Cache_p.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Cache_p.h') 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 userKeys(const std::string &user_id); + std::map> 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); -- cgit 1.5.1