summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_member.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index a340566bb0..67c601b696 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -261,13 +261,10 @@ class RoomMemberHandler(object):
         if "predecessor" in create_event["content"]:
             old_room_id = create_event["content"]["predecessor"]["room_id"]
 
-            # Retrieve room account data for predecessor room
+            # Retrieve user account data for predecessor room
             user_account_data = yield self.store.get_account_data_for_user(
                 user_id,
             )
-            room_tags = yield self.store.get_tags_for_room(
-                user_id, old_room_id,
-            )
 
             # Copy direct message state if applicable
             if user_account_data and "m.direct" in user_account_data[0]:
@@ -286,6 +283,10 @@ class RoomMemberHandler(object):
                         break
 
             # Copy room tags if applicable
+            room_tags = yield self.store.get_tags_for_room(
+                user_id, old_room_id,
+            )
+
             if room_tags:
                 # Copy each room tag to the new room
                 for tag in room_tags.keys():