summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-03-02 15:40:30 +0000
committerRichard van der Hoff <richard@matrix.org>2016-03-02 15:40:30 +0000
commit9ff940a0ef22304732f31fb3d2256afc2aca6bc4 (patch)
tree958d4195ed7a3631cf3fd70bae1bdf38702bbbff /synapse/handlers/room.py
parentFix pyflakes warning (diff)
downloadsynapse-9ff940a0ef22304732f31fb3d2256afc2aca6bc4.tar.xz
Address review comments
Diffstat (limited to '')
-rw-r--r--synapse/handlers/room.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 714bff1750..de72398588 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -528,7 +528,7 @@ class RoomMemberHandler(BaseHandler):
                 if not inviter:
                     raise SynapseError(404, "Not a known room")
 
-                if inviter.domain == self.server_name:
+                if self.hs.is_mine(inviter):
                     # the inviter was on our server, but has now left. Carry on
                     # with the normal rejection codepath.
                     #
@@ -537,7 +537,8 @@ class RoomMemberHandler(BaseHandler):
                     pass
                 else:
                     # send the rejection to the inviter's HS.
-                    remote_room_hosts = [inviter.domain]
+                    remote_room_hosts = remote_room_hosts or []
+                    remote_room_hosts.append(inviter.domain)
                     action = "remote_reject"
 
         federation_handler = self.hs.get_handlers().federation_handler