summary refs log tree commit diff
path: root/synapse/spam_checker_api
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-20 06:39:55 -0400
committerGitHub <noreply@github.com>2020-08-20 06:39:55 -0400
commit76c43f086a3c5feeab1fd0f916086930d44fb1cf (patch)
treed03c010db83df55d6ae5f403d57aad46cedf0c93 /synapse/spam_checker_api
parentClose the database connection we create during startup (#8131) (diff)
downloadsynapse-76c43f086a3c5feeab1fd0f916086930d44fb1cf.tar.xz
Do not assume calls to runInteraction return Deferreds. (#8133)
Diffstat (limited to 'synapse/spam_checker_api')
-rw-r--r--synapse/spam_checker_api/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/spam_checker_api/__init__.py b/synapse/spam_checker_api/__init__.py
index 4d9b13ac04..7f63f1bfa0 100644
--- a/synapse/spam_checker_api/__init__.py
+++ b/synapse/spam_checker_api/__init__.py
@@ -48,8 +48,10 @@ class SpamCheckerApi(object):
             twisted.internet.defer.Deferred[list(synapse.events.FrozenEvent)]:
                 The filtered state events in the room.
         """
-        state_ids = yield self._store.get_filtered_current_state_ids(
-            room_id=room_id, state_filter=StateFilter.from_types(types)
+        state_ids = yield defer.ensureDeferred(
+            self._store.get_filtered_current_state_ids(
+                room_id=room_id, state_filter=StateFilter.from_types(types)
+            )
         )
         state = yield defer.ensureDeferred(self._store.get_events(state_ids.values()))
         return state.values()