From ed9501023ae57e668a930e5d3accbb47ad3d7812 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 5 May 2018 16:38:41 +0300 Subject: Add support for retrieving the notification events (#33) --- include/Cache.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/Cache.h') 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 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_; -- cgit 1.5.1