summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-30 14:46:03 +0000
committerDavid Baker <dave@matrix.org>2015-01-30 14:46:45 +0000
commit322a047502c938bfe9a6acab47e370e69fefc522 (patch)
tree24f42d86ad2d47707a2417e7cfaabcf8482c0fc4 /synapse/storage
parentMerge pull request #38 from matrix-org/new_state_resolution (diff)
downloadsynapse-322a047502c938bfe9a6acab47e370e69fefc522.tar.xz
Add room member count condition and default rule to make a noise on rooms of only 2 people.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 277581b4e2..7b18acf421 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -375,9 +375,12 @@ class DataStore(RoomMemberStore, RoomStore,
             "redacted": del_sql,
         }
 
-        if event_type:
+        if event_type and state_key is not None:
             sql += " AND s.type = ? AND s.state_key = ? "
             args = (room_id, event_type, state_key)
+        elif event_type:
+            sql += " AND s.type = ?"
+            args = (room_id, event_type)
         else:
             args = (room_id, )