summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-09 14:47:27 +0000
committerErik Johnston <erik@matrix.org>2014-12-09 14:47:27 +0000
commit5eca288d280659e69fce5d5eca3e7bf09faac5f0 (patch)
treece7978111ad80afd324bb5936e1f4ba6a3e1f069 /synapse/handlers/room.py
parentChange the way we implement get_events to be less sucky (diff)
downloadsynapse-5eca288d280659e69fce5d5eca3e7bf09faac5f0.tar.xz
Fix joining from an invite
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 6da084b3ac..215b9cc5ac 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -429,12 +429,9 @@ class RoomMemberHandler(BaseHandler):
             )
 
             if prev_state and prev_state.membership == Membership.INVITE:
-                room = yield self.store.get_room(room_id)
-                inviter = UserID.from_string(
-                    prev_state.user_id, self.hs
-                )
+                inviter = UserID.from_string(prev_state.user_id)
 
-                should_do_dance = not self.hs.is_mine(inviter) and not room
+                should_do_dance = not self.hs.is_mine(inviter)
                 room_host = inviter.domain
             else:
                 should_do_dance = False
@@ -511,14 +508,7 @@ class RoomMemberHandler(BaseHandler):
                                     do_auth):
         yield run_on_reactor()
 
-        # If we're inviting someone, then we should also send it to that
-        # HS.
-        target_user_id = event.state_key
-        target_user = self.hs.parse_userid(target_user_id)
-        if membership == Membership.INVITE and not self.hs.is_mine(target_user):
-            do_invite_host = target_user.domain
-        else:
-            do_invite_host = None
+        target_user = self.hs.parse_userid(event.state_key)
 
         yield self.handle_new_client_event(
             event,