summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-03 10:50:49 +0000
committerErik Johnston <erik@matrix.org>2016-02-03 10:50:49 +0000
commit771528ab1323715271b9e968d2d337b88910fb2f (patch)
tree2614f84a572b998b9bc69477cb1adb18ae600c7b /synapse/handlers/sync.py
parentMerge pull request #553 from matrix-org/daniel/accesstokenlogging (diff)
downloadsynapse-771528ab1323715271b9e968d2d337b88910fb2f.tar.xz
Change event_push_actions_rm_tokens schema
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index dc686db541..0292e06733 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -706,10 +706,8 @@ class SyncHandler(BaseHandler):
             )
 
             if notifs is not None:
-                unread_notifications["notification_count"] = len(notifs)
-                unread_notifications["highlight_count"] = len([
-                    1 for notif in notifs if _action_has_highlight(notif["actions"])
-                ])
+                unread_notifications["notification_count"] = notifs["notify_count"]
+                unread_notifications["highlight_count"] = notifs["highlight_count"]
 
         logger.debug("Room sync: %r", room_sync)