summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-11-28 15:19:15 +0000
committerGitHub <noreply@github.com>2017-11-28 15:19:15 +0000
commitc4c1d170afcc78eee8b0a9c65fac666b70598989 (patch)
tree62f993be7cb1ad811b4d80d29f1f76918da8aac8 /synapse
parentMerge branch 'release-v0.25.1' (diff)
downloadsynapse-c4c1d170afcc78eee8b0a9c65fac666b70598989.tar.xz
Fix wrong avatars when inviting multiple users when creating room
We reused the `content` dictionary between invite requests, which meant they could end up reusing the profile info for a previous user
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 496f1fc39b..6a0431ba70 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -205,12 +205,12 @@ class RoomCreationHandler(BaseHandler):
                 },
                 ratelimit=False)
 
-        content = {}
-        is_direct = config.get("is_direct", None)
-        if is_direct:
-            content["is_direct"] = is_direct
-
         for invitee in invite_list:
+            content = {}
+            is_direct = config.get("is_direct", None)
+            if is_direct:
+                content["is_direct"] = is_direct
+            
             yield room_member_handler.update_membership(
                 requester,
                 UserID.from_string(invitee),