summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-03-02 16:44:14 +0000
committerRichard van der Hoff <richard@matrix.org>2016-03-02 16:44:14 +0000
commitfc1f932cc04ed6675fb839b58d81d5ac6c23b4c5 (patch)
treeb54d5d0dfc092dd59f6672e86e7c1aff88ab8432 /synapse
parentfix pyflakes quibble (diff)
downloadsynapse-fc1f932cc04ed6675fb839b58d81d5ac6c23b4c5.tar.xz
Move arg default to the start of the function
Also don't overwrite the list that gets passed in.
Diffstat (limited to 'synapse')
-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 de72398588..9ef3219e39 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -493,6 +493,8 @@ class RoomMemberHandler(BaseHandler):
         Raises:
             SynapseError if there was a problem changing the membership.
         """
+        remote_room_hosts = remote_room_hosts or []
+
         target_user = UserID.from_string(event.state_key)
         room_id = event.room_id
 
@@ -537,8 +539,7 @@ class RoomMemberHandler(BaseHandler):
                     pass
                 else:
                     # send the rejection to the inviter's HS.
-                    remote_room_hosts = remote_room_hosts or []
-                    remote_room_hosts.append(inviter.domain)
+                    remote_room_hosts = remote_room_hosts + [inviter.doman]
                     action = "remote_reject"
 
         federation_handler = self.hs.get_handlers().federation_handler