summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-12-02 20:51:12 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-12-02 20:51:12 +0000
commit307f94dcbe0a78de4f5bba9aeb53102cd201a961 (patch)
treec0efe28580fc5e027e98f350eecce1989da40841 /synapse
parentMerge branch 'develop' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-307f94dcbe0a78de4f5bba9aeb53102cd201a961.tar.xz
Squash room_ids list to a set() to remove duplicates - with TODO marker as I have no idea /why/ the dups are happening in the first place
Diffstat (limited to '')
-rw-r--r--synapse/handlers/room.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 88955160c5..a000b44036 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -519,7 +519,11 @@ class RoomMemberHandler(BaseHandler):
             user_id=user.to_string(), membership_list=membership_list
         )
 
-        defer.returnValue([r.room_id for r in rooms])
+        # For some reason the list of events contains duplicates
+        # TODO(paul): work out why because I really don't think it should
+        room_ids = set(r.room_id for r in rooms)
+
+        defer.returnValue(room_ids)
 
     @defer.inlineCallbacks
     def _do_local_membership_update(self, event, membership, snapshot,