aboutsummaryrefslogtreecommitdiff
path: root/events/receiptevent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-19 10:54:07 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-19 13:01:01 +0900
commitc5c26ff4a09eecaa6d8e1507087566ccf0fd96b4 (patch)
treec64b3c0b3bdbec6bf7c634a1f302c22b202c3861 /events/receiptevent.h
parent95e6ae003e3f5ed806bc7adf4e10713cd4e35d1f (diff)
downloadlibquotient-c5c26ff4a09eecaa6d8e1507087566ccf0fd96b4.tar.gz
libquotient-c5c26ff4a09eecaa6d8e1507087566ccf0fd96b4.zip
Room: cache last read event and unread messages flag with the room state
Since there's no such thing as "unread messages flag" in the CS API spec, there's now a non-standard key-value in cached m.read receipts for that.
Diffstat (limited to 'events/receiptevent.h')
-rw-r--r--events/receiptevent.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/events/receiptevent.h b/events/receiptevent.h
index 1d280822..cbe36b10 100644
--- a/events/receiptevent.h
+++ b/events/receiptevent.h
@@ -41,9 +41,11 @@ namespace QMatrixClient
EventsWithReceipts eventsWithReceipts() const
{ return _eventsWithReceipts; }
+ bool unreadMessages() const { return _unreadMessages; }
private:
EventsWithReceipts _eventsWithReceipts;
+ bool _unreadMessages; // Spec extension for caching purposes
static constexpr const char * jsonType = "m.receipt";
};