diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-17 07:08:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 07:08:30 -0400 |
commit | 6fca1b3506e31e6864e1dc18046f1962813f14e2 (patch) | |
tree | ef15f4747dd7767e367c24589f1f0732fa943a91 /synapse/handlers/message.py | |
parent | Add admin endpoint to get members in a room. (#7842) (diff) | |
download | synapse-6fca1b3506e31e6864e1dc18046f1962813f14e2.tar.xz |
Convert _base, profile, and _receipts handlers to async/await (#7860)
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index da206e1ec1..c47764a4ce 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -488,11 +488,15 @@ class EventCreationHandler(object): try: if "displayname" not in content: - displayname = yield profile.get_displayname(target) + displayname = yield defer.ensureDeferred( + profile.get_displayname(target) + ) if displayname is not None: content["displayname"] = displayname if "avatar_url" not in content: - avatar_url = yield profile.get_avatar_url(target) + avatar_url = yield defer.ensureDeferred( + profile.get_avatar_url(target) + ) if avatar_url is not None: content["avatar_url"] = avatar_url except Exception as e: |