summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-19 16:37:08 +0000
committerErik Johnston <erik@matrix.org>2014-12-19 16:37:08 +0000
commitd61109f5781fecfdc8b3ea1f1ae74a72f8a2a913 (patch)
treedff914dc74740d36be1da73be66a8b06c6c4feea /synapse/handlers/room.py
parentMerge branch 'release-v0.6.0' of github.com:matrix-org/synapse into erikj-perf (diff)
parentSet a state_key for the topic and room name, otherwise they won't be treated ... (diff)
downloadsynapse-d61109f5781fecfdc8b3ea1f1ae74a72f8a2a913.tar.xz
Merge branch 'hotfixes-v0.6.0' of github.com:matrix-org/synapse into erikj-perf
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 8567d7409d..deefc3c11e 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -130,6 +130,7 @@ class RoomCreationHandler(BaseHandler):
                 "type": EventTypes.Name,
                 "room_id": room_id,
                 "sender": user_id,
+                "state_key": "",
                 "content": {"name": name},
             })
 
@@ -139,6 +140,7 @@ class RoomCreationHandler(BaseHandler):
                 "type": EventTypes.Topic,
                 "room_id": room_id,
                 "sender": user_id,
+                "state_key": "",
                 "content": {"topic": topic},
             })
 
@@ -147,7 +149,7 @@ class RoomCreationHandler(BaseHandler):
                 "type": EventTypes.Member,
                 "state_key": invitee,
                 "room_id": room_id,
-                "user_id": user_id,
+                "sender": user_id,
                 "content": {"membership": Membership.INVITE},
             })
 
@@ -390,6 +392,11 @@ class RoomMemberHandler(BaseHandler):
 
         host = hosts[0]
 
+        # If event doesn't include a display name, add one.
+        yield self.distributor.fire(
+            "collect_presencelike_data", joinee, content
+        )
+
         content.update({"membership": Membership.JOIN})
         builder = self.event_builder_factory.new({
             "type": EventTypes.Member,