summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-03 16:01:24 +0100
committerErik Johnston <erik@matrix.org>2016-05-04 10:16:46 +0100
commita438a6d2bca7fae3a4f1fa38b72b821c742cdc8a (patch)
tree378301f592f41cc91ebee70ab501e87ad5faf057 /synapse/api
parentMerge pull request #758 from matrix-org/dbkr/fix_password_reset (diff)
downloadsynapse-a438a6d2bca7fae3a4f1fa38b72b821c742cdc8a.tar.xz
Implement basic ignore user
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/filtering.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index cd699ef27f..4f5a4281fa 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -15,6 +15,8 @@
 from synapse.api.errors import SynapseError
 from synapse.types import UserID, RoomID
 
+from twisted.internet import defer
+
 import ujson as json
 
 
@@ -24,10 +26,10 @@ class Filtering(object):
         super(Filtering, self).__init__()
         self.store = hs.get_datastore()
 
+    @defer.inlineCallbacks
     def get_user_filter(self, user_localpart, filter_id):
-        result = self.store.get_user_filter(user_localpart, filter_id)
-        result.addCallback(FilterCollection)
-        return result
+        result = yield self.store.get_user_filter(user_localpart, filter_id)
+        defer.returnValue(FilterCollection(result))
 
     def add_user_filter(self, user_localpart, user_filter):
         self.check_valid_filter(user_filter)