summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorpik <alexander.maznev@gmail.com>2017-03-07 20:54:02 -0300
committerpik <alexander.maznev@gmail.com>2017-03-23 11:42:10 -0300
commitacafcf1c5b1c40fe14054a1d5bb8277a9f16a492 (patch)
tree717be5edbc2ee72be1db7c7ffe0c5b100921e47f /synapse/api
parentcheck_valid_filter using JSONSchema (diff)
downloadsynapse-acafcf1c5b1c40fe14054a1d5bb8277a9f16a492.tar.xz
Add valid filter tests, flake8, fix typo
Signed-off-by: pik <alexander.maznev@gmail.com>
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/filtering.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index 6acf986351..3d078e622e 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -78,7 +78,7 @@ ROOM_FILTER_SCHEMA = {
         "timeline": {
             "$ref": "#/definitions/room_event_filter"
         },
-        "accpount_data": {
+        "account_data": {
             "$ref": "#/definitions/room_event_filter"
         },
     }
@@ -131,7 +131,7 @@ USER_ID_ARRAY_SCHEMA = {
     "type": "array",
     "items": {
         "type": "string",
-        "pattern": "^[A-Za-z0-9_]+:[A-Za-z0-9_-\.]+$"
+        "pattern": "^@[A-Za-z0-9_]+:[A-Za-z0-9_\-\.]+$"
     }
 }
 
@@ -155,9 +155,10 @@ USER_FILTER_SCHEMA = {
         "room": {
             "$ref": "#/definitions/room_filter"
         },
-        # "event_format": {
-        #     "type": { "enum": [ "client", "federation" ] }
-        # },
+        "event_format": {
+            "type": "string",
+            "enum": ["client", "federation"]
+        },
         "event_fields": {
             "type": "array",
             "items": {