diff options
author | kamathmanu <manuriddle@gmail.com> | 2021-08-07 21:20:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-07 21:20:43 +0000 |
commit | 2dfccda73c44d97e9e3e52db3e03315e8ef656a5 (patch) | |
tree | 52c9855610cbdf6f6284cfacbaba07f676a0f621 /src/timeline/EventStore.h | |
parent | Fix Duplicate fetched chunk (diff) | |
parent | Show encryption errors in qml and add request keys button (diff) | |
download | nheko-2dfccda73c44d97e9e3e52db3e03315e8ef656a5.tar.xz |
Merge branch 'master' into nhekoRoomDirectory
Diffstat (limited to 'src/timeline/EventStore.h')
-rw-r--r-- | src/timeline/EventStore.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/timeline/EventStore.h b/src/timeline/EventStore.h index 7c404102..59c1c7c0 100644 --- a/src/timeline/EventStore.h +++ b/src/timeline/EventStore.h @@ -15,6 +15,7 @@ #include <mtx/responses/messages.hpp> #include <mtx/responses/sync.hpp> +#include "Olm.h" #include "Reaction.h" class EventStore : public QObject @@ -78,6 +79,9 @@ public: mtx::events::collections::TimelineEvents *get(int idx, bool decrypt = true); QVariantList reactions(const std::string &event_id); + olm::DecryptionErrorCode decryptionError(std::string id); + void requestSession(const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &ev, + bool manual); int size() const { @@ -119,7 +123,7 @@ public slots: private: std::vector<mtx::events::collections::TimelineEvents> edits(const std::string &event_id); - mtx::events::collections::TimelineEvents *decryptEvent( + olm::DecryptionResult *decryptEvent( const IdIndex &idx, const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &e); void handle_room_verification(mtx::events::collections::TimelineEvents event); @@ -129,7 +133,7 @@ private: uint64_t first = std::numeric_limits<uint64_t>::max(), last = std::numeric_limits<uint64_t>::max(); - static QCache<IdIndex, mtx::events::collections::TimelineEvents> decryptedEvents_; + static QCache<IdIndex, olm::DecryptionResult> decryptedEvents_; static QCache<Index, mtx::events::collections::TimelineEvents> events_; static QCache<IdIndex, mtx::events::collections::TimelineEvents> events_by_id_; @@ -137,6 +141,7 @@ private: { std::string request_id; std::vector<mtx::events::EncryptedEvent<mtx::events::msg::Encrypted>> events; + qint64 requested_at; }; std::map<std::string, PendingKeyRequests> pending_key_requests; |