From 7ecabcd61410783267f1ef4353d65716b84f7f83 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 18 Jun 2018 18:36:19 +0300 Subject: Mark encrypted rooms when processing room state --- include/Cache.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Cache.h b/include/Cache.h index f5a655cf..3d906f02 100644 --- a/include/Cache.h +++ b/include/Cache.h @@ -29,6 +29,8 @@ #include #include +#include "Logging.hpp" + using mtx::events::state::JoinRule; struct RoomMember @@ -345,7 +347,7 @@ public: bool isNotificationSent(const std::string &event_id); //! Mark a room that uses e2e encryption. - void setEncryptedRoom(const std::string &room_id); + void setEncryptedRoom(lmdb::txn &txn, const std::string &room_id); bool isRoomEncrypted(const std::string &room_id); //! Save the public keys for a device. @@ -467,6 +469,9 @@ private: } } + return; + } else if (mpark::holds_alternative>(event)) { + setEncryptedRoom(txn, room_id); return; } -- cgit 1.5.1