mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 02:10:55 +00:00
Don't clobber a displayname or avatar_url if provided by an m.room.member event
This commit is contained in:
parent
ba8e144554
commit
10e48d8310
1 changed files with 4 additions and 2 deletions
|
@ -208,8 +208,10 @@ class MessageHandler(BaseHandler):
|
|||
content = builder.content
|
||||
|
||||
try:
|
||||
content["displayname"] = yield profile.get_displayname(target)
|
||||
content["avatar_url"] = yield profile.get_avatar_url(target)
|
||||
if "displayname" not in content:
|
||||
content["displayname"] = yield profile.get_displayname(target)
|
||||
if "avatar_url" not in content:
|
||||
content["avatar_url"] = yield profile.get_avatar_url(target)
|
||||
except Exception as e:
|
||||
logger.info(
|
||||
"Failed to get profile information for %r: %s",
|
||||
|
|
Loading…
Reference in a new issue