Skip to content
Snippets Groups Projects
Unverified Commit 0248409b authored by Patrick Cloke's avatar Patrick Cloke Committed by GitHub
Browse files

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.
parent c027a199
No related branches found
No related tags found
No related merge requests found
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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment