summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/filter.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/rest/client/v2_alpha/filter.py b/synapse/rest/client/v2_alpha/filter.py
index 585c8e02e8..09e44e8ae0 100644
--- a/synapse/rest/client/v2_alpha/filter.py
+++ b/synapse/rest/client/v2_alpha/filter.py
@@ -54,10 +54,12 @@ class GetFilterRestServlet(RestServlet):
             raise SynapseError(400, "Invalid filter_id")
 
         try:
-            defer.returnValue((200, self.filtering.get_user_filter(
+            filter = yield self.filtering.get_user_filter(
                 user_localpart=target_user.localpart,
                 filter_id=filter_id,
-            )))
+            )
+
+            defer.returnValue((200, filter))
         except KeyError:
             raise SynapseError(400, "No such filter")
 
@@ -89,7 +91,7 @@ class CreateFilterRestServlet(RestServlet):
         except:
             raise SynapseError(400, "Invalid filter definition")
 
-        filter_id = self.filtering.add_user_filter(
+        filter_id = yield self.filtering.add_user_filter(
             user_localpart=target_user.localpart,
             definition=content,
         )