mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Merge pull request #1852 from matrix-org/paul/issue-1382
Don't clobber a displayname or avatar_url if provided by an m.room.member event
This commit is contained in:
commit
e978247fe5
@ -208,8 +208,10 @@ class MessageHandler(BaseHandler):
|
|||||||
content = builder.content
|
content = builder.content
|
||||||
|
|
||||||
try:
|
try:
|
||||||
content["displayname"] = yield profile.get_displayname(target)
|
if "displayname" not in content:
|
||||||
content["avatar_url"] = yield profile.get_avatar_url(target)
|
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:
|
except Exception as e:
|
||||||
logger.info(
|
logger.info(
|
||||||
"Failed to get profile information for %r: %s",
|
"Failed to get profile information for %r: %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user