summary refs log tree commit diff
path: root/include/Cache.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-18 18:36:19 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-18 18:36:19 +0300
commit7ecabcd61410783267f1ef4353d65716b84f7f83 (patch)
treea144076be0dc757ae34ef4f08d28473f3fc9591b /include/Cache.h
parentSave the olm account after we create new one-time keys (diff)
downloadnheko-7ecabcd61410783267f1ef4353d65716b84f7f83.tar.xz
Mark encrypted rooms when processing room state
Diffstat (limited to 'include/Cache.h')
-rw-r--r--include/Cache.h7
1 files changed, 6 insertions, 1 deletions
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 <mtxclient/crypto/client.hpp> #include <mutex> +#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. @@ -468,6 +470,9 @@ private: } return; + } else if (mpark::holds_alternative<StateEvent<Encryption>>(event)) { + setEncryptedRoom(txn, room_id); + return; } if (!isStateEvent(event))