summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-30 14:57:33 +0000
committerErik Johnston <erik@matrix.org>2015-01-30 14:57:33 +0000
commitfdd2ac495a6da1bce765fc008e9d9bc114451458 (patch)
tree576bc559059b0847d2559f3c5dd00de9cf4bf83f /synapse/storage/__init__.py
parentBe more specific in naming columns in selects. (diff)
parentMerge pull request #37 from matrix-org/client_v2_filter (diff)
downloadsynapse-fdd2ac495a6da1bce765fc008e9d9bc114451458.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into rejections_storage
Conflicts:
	synapse/storage/__init__.py
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 1f1b720e5e..f233ff2a2a 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -32,10 +32,14 @@ from .event_federation import EventFederationStore
 from .pusher import PusherStore
 from .push_rule import PushRuleStore
 from .media_repository import MediaRepositoryStore
+<<<<<<< HEAD
 from .rejections import RejectionsStore
 
+=======
+>>>>>>> 471c47441d0c188e845b75c8f446c44899fdcfe7
 from .state import StateStore
 from .signatures import SignatureStore
+from .filtering import FilteringStore
 
 from syutil.base64util import decode_base64
 from syutil.jsonutil import encode_canonical_json
@@ -65,6 +69,7 @@ SCHEMAS = [
     "event_signatures",
     "pusher",
     "media_repository",
+    "filtering",
 ]
 
 
@@ -87,6 +92,7 @@ class DataStore(RoomMemberStore, RoomStore,
                 EventFederationStore,
                 MediaRepositoryStore,
                 RejectionsStore,
+                FilteringStore,
                 PusherStore,
                 PushRuleStore
                 ):
@@ -380,9 +386,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, )