summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-15 16:48:16 +0100
committerErik Johnston <erik@matrix.org>2014-08-15 16:48:16 +0100
commit40c020ad1332dc3f0a3a87cdb0966fab79efdc7b (patch)
treea42c8da07a019c2d3f2fbf95a1f9be42f5dc81ff /synapse
parentRename method name to not clash with other ones in storage. (diff)
parentAlso include users' presence when responding to /rooms/:room_id/members/list (diff)
downloadsynapse-40c020ad1332dc3f0a3a87cdb0966fab79efdc7b.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/room.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index 3f153df8e3..303759b718 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -351,6 +351,13 @@ class RoomMemberListRestServlet(RestServlet):
             room_id=urllib.unquote(room_id),
             user_id=user.to_string())
 
+        for event in members["chunk"]:
+            target_user = self.hs.parse_userid(event["target_user_id"])
+            presence_state = yield self.handlers.presence_handler.get_state(
+                target_user=target_user, auth_user=user
+            )
+            event["content"].update(presence_state)
+
         defer.returnValue((200, members))