summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-11-10 19:34:47 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-11-10 19:34:47 +0000
commitc23afed39a3a2796a53caaec19de2d53873956e5 (patch)
treed0d42105f6401cfb78afbfacc8907d6d1f92c980 /synapse/handlers/message.py
parentPut room state in room initialSync output - I guess this is right; I really c... (diff)
downloadsynapse-c23afed39a3a2796a53caaec19de2d53873956e5.tar.xz
Include room membership in room initialSync
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index d8764a8933..811e280c2d 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -336,11 +336,17 @@ class MessageHandler(BaseHandler):
                       feedback=False):
         yield self.auth.check_joined_room(room_id, user_id)
 
+        # TODO: These concurrently
         state_tuples = yield self.store.get_current_state(room_id)
         state = [self.hs.serialize_event(x) for x in state_tuples]
 
+        member_event = (yield self.store.get_room_member(
+            user_id=user_id,
+            room_id=room_id
+        ))
+
         defer.returnValue({
-            #"membership": membership,
+            "membership": member_event.membership,
             "room_id": room_id,
             #"messages": messages,
             "state": state,