summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-08 17:50:56 +0000
committerErik Johnston <erik@matrix.org>2014-12-08 17:50:56 +0000
commit609c31e8dfa23bce3b34500f28df4f8eaf740a91 (patch)
treef376ab7c28c37db5f358318555596e5d05afb468 /synapse/handlers/room.py
parentMore bug fixes (diff)
downloadsynapse-609c31e8dfa23bce3b34500f28df4f8eaf740a91.tar.xz
More bug fixes
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 4f4b275290..6da084b3ac 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -171,6 +171,7 @@ class RoomCreationHandler(BaseHandler):
         event_keys = {
             "room_id": room_id,
             "sender": creator_id,
+            "state_key": "",
         }
 
         def create(etype, content, **kwargs):
@@ -187,7 +188,6 @@ class RoomCreationHandler(BaseHandler):
         creation_event = create(
             etype=RoomCreateEvent.TYPE,
             content={"creator": creator.to_string()},
-            state_key="",
         )
 
         join_event = create(
@@ -388,7 +388,7 @@ class RoomMemberHandler(BaseHandler):
         host = hosts[0]
 
         content.update({"membership": Membership.JOIN})
-        event, context = yield self.create_new_client_event({
+        builder = self.event_builder_factory.new({
             "type": RoomMemberEvent.TYPE,
             "state_key": joinee.to_string(),
             "room_id": room_id,
@@ -396,6 +396,7 @@ class RoomMemberHandler(BaseHandler):
             "membership": Membership.JOIN,
             "content": content,
         })
+        event, context = yield self._create_new_client_event(builder)
 
         yield self._do_join(event, context, room_host=host, do_auth=True)
 
@@ -442,7 +443,11 @@ class RoomMemberHandler(BaseHandler):
         if should_do_dance:
             handler = self.hs.get_handlers().federation_handler
             have_joined = yield handler.do_invite_join(
-                room_host, room_id, event.user_id, event.content, context
+                room_host,
+                room_id,
+                event.user_id,
+                event.get_dict()["content"],  # FIXME To get a non-frozen dict
+                context
             )
 
         # We want to do the _do_update inside the room lock.