summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-04 15:49:06 +0000
committerDavid Baker <dave@matrix.org>2016-01-04 15:49:06 +0000
commitc77e7e60fc5d29e8a57bb82dd5aa8e72ae570d84 (patch)
tree2900e5d3982ccc38effc275e54798f95221bb5a7 /synapse
parentcomma (diff)
downloadsynapse-c77e7e60fc5d29e8a57bb82dd5aa8e72ae570d84.tar.xz
Only joined rooms have unread_notif_count
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v2_alpha/sync.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py
index cd3aef9e07..095f96e218 100644
--- a/synapse/rest/client/v2_alpha/sync.py
+++ b/synapse/rest/client/v2_alpha/sync.py
@@ -311,12 +311,12 @@ class SyncRestServlet(RestServlet):
             },
             "state": {"events": serialized_state},
             "account_data": {"events": account_data},
-            "unread_notification_count": room.unread_notification_count
         }
 
         if joined:
             ephemeral_events = filter.filter_room_ephemeral(room.ephemeral)
             result["ephemeral"] = {"events": ephemeral_events}
+            result["unread_notification_count"] = room.unread_notification_count
 
         return result