mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -04:00
Convert directory handler to async/await (#7727)
This commit is contained in:
parent
91e886d615
commit
e060bf4462
3 changed files with 33 additions and 40 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue