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 15:16:38 +0000
committerErik Johnston <erik@matrix.org>2015-01-30 15:16:38 +0000
commit1bd540ef7943c08e350ba24c407f152016fa6064 (patch)
tree47f2f0cbc07a943fbdd8d154b6d88ace246e4787 /synapse/storage/__init__.py
parentMerge branch 'replication_split' of github.com:matrix-org/synapse into reject... (diff)
parentMerge pull request #42 from matrix-org/replication_split (diff)
downloadsynapse-1bd540ef7943c08e350ba24c407f152016fa6064.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into rejections
Conflicts:
	synapse/storage/schema/im.sql
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py

index adcb038020..7c54b1b9d3 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py
@@ -36,6 +36,7 @@ from .rejections import RejectionsStore 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 +66,8 @@ SCHEMAS = [ "event_signatures", "pusher", "media_repository", + "filtering", + "rejections", ] @@ -87,6 +90,7 @@ class DataStore(RoomMemberStore, RoomStore, EventFederationStore, MediaRepositoryStore, RejectionsStore, + FilteringStore, PusherStore, PushRuleStore ): @@ -380,9 +384,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, )