summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 8f56d90d95..2534d109fd 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -402,8 +402,8 @@ class DataStore(RoomMemberStore, RoomStore,
             "redacted": del_sql,
         }
 
-        sql += " AND (s.type = 'm.room.name' AND s.state_key = '')"
-        sql += " OR s.type = 'm.room.aliases'"
+        sql += " AND ((s.type = 'm.room.name' AND s.state_key = '')"
+        sql += " OR s.type = 'm.room.aliases')"
         args = (room_id,)
 
         results = yield self._execute_and_decode(sql, *args)