mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Convert _base, profile, and _receipts handlers to async/await (#7860)
This commit is contained in:
parent
fff483ea96
commit
6fca1b3506
6 changed files with 53 additions and 59 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue