summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-06-22 07:18:00 -0400
committerGitHub <noreply@github.com>2020-06-22 07:18:00 -0400
commite060bf44625da4aa0a61fc792c3ef9af8ad05769 (patch)
tree54fa2035f869a10cb377bf49cbf2318933ca0568 /synapse/handlers/message.py
parentSpeed up state res v2 across large state differences. (#7725) (diff)
downloadsynapse-e060bf44625da4aa0a61fc792c3ef9af8ad05769.tar.xz
Convert directory handler to async/await (#7727)
Diffstat (limited to '')
-rw-r--r--synapse/handlers/message.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 200127d291..665ad19b5d 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -879,7 +879,9 @@ class EventCreationHandler(object):
         """
         room_alias = RoomAlias.from_string(room_alias_str)
         try:
-            mapping = yield directory_handler.get_association(room_alias)
+            mapping = yield defer.ensureDeferred(
+                directory_handler.get_association(room_alias)
+            )
         except SynapseError as e:
             # Turn M_NOT_FOUND errors into M_BAD_ALIAS errors.
             if e.errcode == Codes.NOT_FOUND: