summary refs log tree commit diff
path: root/include/Cache.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-05 16:38:41 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-05 16:38:41 +0300
commited9501023ae57e668a930e5d3accbb47ad3d7812 (patch)
tree11d0150f0bd3bae0013e67cbd3e184b778e9946b /include/Cache.h
parentAdd compile option for address sanitizers (diff)
downloadnheko-ed9501023ae57e668a930e5d3accbb47ad3d7812.tar.xz
Add support for retrieving the notification events (#33)
Diffstat (limited to 'include/Cache.h')
-rw-r--r--include/Cache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/Cache.h b/include/Cache.h

index 0829acf5..1fa6c430 100644 --- a/include/Cache.h +++ b/include/Cache.h
@@ -233,6 +233,12 @@ public: std::vector<RoomSearchResult> searchRooms(const std::string &query, std::uint8_t max_items = 5); + void markSentNotification(const std::string &event_id); + //! Removes an event from the sent notifications. + void removeReadNotification(const std::string &event_id); + //! Check if we have sent a desktop notification for the given event id. + bool isNotificationSent(const std::string &event_id); + private: //! Save an invited room. void saveInvite(lmdb::txn &txn, @@ -422,6 +428,7 @@ private: lmdb::dbi invitesDb_; lmdb::dbi mediaDb_; lmdb::dbi readReceiptsDb_; + lmdb::dbi notificationsDb_; QString localUserId_; QString cacheDirectory_;