summary refs log tree commit diff
path: root/synapse/handlers/profile.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r--synapse/handlers/profile.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index 32af622733..629e6e3594 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -169,15 +169,8 @@ class ProfileHandler(BaseHandler):
             consumeErrors=True
         ).addErrback(unwrapFirstError)
 
-        if displayname is None:
-            del state["displayname"]
-        else:
-            state["displayname"] = displayname
-
-        if avatar_url is None:
-            del state["avatar_url"]
-        else:
-            state["avatar_url"] = avatar_url
+        state["displayname"] = displayname
+        state["avatar_url"] = avatar_url
 
         defer.returnValue(None)