aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-05 12:09:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-05 12:09:29 +0900
commitd1fd237d8f917d393a2a8491abc1554abd398085 (patch)
tree05268928566fc81f1ccfa6dbce01ea842e241c43
parent071856d31995f665ee9219b3e05510ab83f9f4d8 (diff)
downloadlibquotient-d1fd237d8f917d393a2a8491abc1554abd398085.tar.gz
libquotient-d1fd237d8f917d393a2a8491abc1554abd398085.zip
Include unread/notification counters to the cache
-rw-r--r--room.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index 212c8acd..1393e145 100644
--- a/room.cpp
+++ b/room.cpp
@@ -938,6 +938,12 @@ QJsonObject Room::Private::toJson() const {
QJsonObject result;
result.insert("state", roomStateObj);
+
+ QJsonObject unreadNotificationsObj;
+ unreadNotificationsObj.insert("highlight_count", highlightCount);
+ unreadNotificationsObj.insert("notification_count", notificationCount);
+ result.insert("unread_notifications", unreadNotificationsObj);
+
return result;
}