mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Handle a display name / avatar URL not included in a federation request. (#9023)
These may be omitted if not set, but Synapse assumed they would be in the response.
This commit is contained in:
parent
c027a199f3
commit
0248409bfa
1
changelog.d/9023.bugfix
Normal file
1
changelog.d/9023.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a longstanding issue where an internal server error would occur when requesting a profile over federation that did not include a display name / avatar URL.
|
@ -156,7 +156,7 @@ class ProfileHandler(BaseHandler):
|
||||
except HttpResponseException as e:
|
||||
raise e.to_synapse_error()
|
||||
|
||||
return result["displayname"]
|
||||
return result.get("displayname")
|
||||
|
||||
async def set_displayname(
|
||||
self,
|
||||
@ -246,7 +246,7 @@ class ProfileHandler(BaseHandler):
|
||||
except HttpResponseException as e:
|
||||
raise e.to_synapse_error()
|
||||
|
||||
return result["avatar_url"]
|
||||
return result.get("avatar_url")
|
||||
|
||||
async def set_avatar_url(
|
||||
self,
|
||||
|
Loading…
Reference in New Issue
Block a user