diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-24 19:39:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 19:39:16 +0100 |
commit | 91c1d93d3389ac924f1013dc7b37dfe70a17e57e (patch) | |
tree | a3cbbccf1cb77e0ced68f5dc1175dde0f8999bb6 /lib/syncdata.h | |
parent | a2cc707107464fd98fc8a33afde3ed29f8cd9526 (diff) | |
parent | c57d6de40fb790a4920a9c8ff235511860d68f32 (diff) | |
download | libquotient-91c1d93d3389ac924f1013dc7b37dfe70a17e57e.tar.gz libquotient-91c1d93d3389ac924f1013dc7b37dfe70a17e57e.zip |
Merge pull request #521 from quotient-im/kitsune-unread-statistics
Diffstat (limited to 'lib/syncdata.h')
-rw-r--r-- | lib/syncdata.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/syncdata.h b/lib/syncdata.h index b869a541..36d2e0bf 100644 --- a/lib/syncdata.h +++ b/lib/syncdata.h @@ -8,6 +8,12 @@ #include "events/stateevent.h" namespace Quotient { + +constexpr auto UnreadNotificationsKey = "unread_notifications"_ls; +constexpr auto PartiallyReadCountKey = "x-quotient.since_fully_read_count"_ls; +constexpr auto NewUnreadCountKey = "org.matrix.msc2654.unread_count"_ls; +constexpr auto HighlightCountKey = "highlight_count"_ls; + /// Room summary, as defined in MSC688 /** * Every member of this structure is an Omittable; as per the MSC, only @@ -29,7 +35,6 @@ struct RoomSummary { }; QDebug operator<<(QDebug dbg, const RoomSummary& rs); - template <> struct JsonObjectConverter<RoomSummary> { static void dumpTo(QJsonObject& jo, const RoomSummary& rs); @@ -48,16 +53,14 @@ public: bool timelineLimited; QString timelinePrevBatch; + Omittable<int> partiallyReadCount; Omittable<int> unreadCount; Omittable<int> highlightCount; - Omittable<int> notificationCount; - SyncRoomData(const QString& roomId, JoinState joinState_, - const QJsonObject& room_); + SyncRoomData(QString roomId, JoinState joinState, + const QJsonObject& roomJson); SyncRoomData(SyncRoomData&&) = default; SyncRoomData& operator=(SyncRoomData&&) = default; - - static const QString UnreadCountKey; }; // QVector cannot work with non-copyable objects, std::vector can. |