summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-15 16:45:39 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-15 16:45:39 +0300
commit24e0285210e758ab4913fbad84daba632bc2a6d1 (patch)
tree7f4267e003784576f8c32d697eac675a32e9194f /include
parentPass down toolchain file on Windows (diff)
downloadnheko-24e0285210e758ab4913fbad84daba632bc2a6d1.tar.xz
Don't try to send megolm session keys to devices with no one-time keys
Diffstat (limited to 'include')
-rw-r--r--include/timeline/TimelineView.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/timeline/TimelineView.h b/include/timeline/TimelineView.h

index 5b5c2292..a985f75b 100644 --- a/include/timeline/TimelineView.h +++ b/include/timeline/TimelineView.h
@@ -33,6 +33,19 @@ #include "ScrollBar.h" #include "TimelineItem.h" +class StateKeeper +{ +public: + StateKeeper(std::function<void()> &&fn) + : fn_(std::move(fn)) + {} + + ~StateKeeper() { fn_(); } + +private: + std::function<void()> fn_; +}; + class FloatingButton; struct DescInfo; @@ -181,6 +194,14 @@ private: TimelineEvent parseEncryptedEvent( const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &e); + void handleClaimedKeys(std::shared_ptr<StateKeeper> keeper, + const std::string &room_key, + const DevicePublicKeys &pks, + const std::string &user_id, + const std::string &device_id, + const mtx::responses::ClaimKeys &res, + mtx::http::RequestErr err); + //! Callback for all message sending. void sendRoomMessageHandler(const std::string &txn_id, const mtx::responses::EventId &res,