summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-11-05 11:15:39 +0000
committerMark Haines <mjark@negativecurvature.net>2015-11-05 11:15:39 +0000
commit7a369e8a550b8cda1aeeb32d328c038c57fec6cc (patch)
tree15beec63e6317537d99c249dd87802b199dd7788
parentMerge branch 'develop' of github.com:matrix-org/synapse into develop (diff)
parentRemove fields that are both unspecified and unused from the filter checks, ch... (diff)
downloadsynapse-7a369e8a550b8cda1aeeb32d328c038c57fec6cc.tar.xz
Merge pull request #347 from matrix-org/markjh/check_filter
Remove fields that are both unspecified and unused from the filter checks
Diffstat (limited to '')
-rw-r--r--synapse/api/filtering.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index e4e3d1c59d..aaa2433cae 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -50,11 +50,11 @@ class Filtering(object):
         # many definitions.
 
         top_level_definitions = [
-            "public_user_data", "private_user_data", "server_data"
+            "presence"
         ]
 
         room_level_definitions = [
-            "state", "timeline", "ephemeral"
+            "state", "timeline", "ephemeral", "private_user_data"
         ]
 
         for key in top_level_definitions:
@@ -114,22 +114,6 @@ class Filtering(object):
                     if not isinstance(event_type, basestring):
                         raise SynapseError(400, "Event type should be a string")
 
-        if "format" in definition:
-            event_format = definition["format"]
-            if event_format not in ["federation", "events"]:
-                raise SynapseError(400, "Invalid format: %s" % (event_format,))
-
-        if "select" in definition:
-            event_select_list = definition["select"]
-            for select_key in event_select_list:
-                if select_key not in ["event_id", "origin_server_ts",
-                                      "thread_id", "content", "content.body"]:
-                    raise SynapseError(400, "Bad select: %s" % (select_key,))
-
-        if ("bundle_updates" in definition and
-                type(definition["bundle_updates"]) != bool):
-            raise SynapseError(400, "Bad bundle_updates: expected bool.")
-
 
 class FilterCollection(object):
     def __init__(self, filter_json):