summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-01-06 07:29:03 -0500
committerGitHub <noreply@github.com>2021-01-06 07:29:03 -0500
commit0248409bfade6a9eccf29efdd38d9003c0327a1d (patch)
tree3313720994d10819d4cd493e6924d10f274376d7 /synapse/handlers
parentIgnore date-rotated logs (#9018) (diff)
downloadsynapse-0248409bfade6a9eccf29efdd38d9003c0327a1d.tar.xz
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.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/profile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index dee0ef45e7..36f9ee4b71 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -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,