summary refs log tree commit diff
path: root/synapse/handlers/profile.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-18 10:23:37 +0100
committerErik Johnston <erik@matrix.org>2015-05-18 10:23:37 +0100
commit131bdf9bb177a337a57f0a3f746ec019dbc5ace6 (patch)
tree8c26a82d488990d55c2ab51ded91fd7219ccbb8c /synapse/handlers/profile.py
parentRemove pointless newline (diff)
parentMove get_events functions to storage.events (diff)
downloadsynapse-131bdf9bb177a337a57f0a3f746ec019dbc5ace6.tar.xz
Merge branch 'erikj/events_move' of github.com:matrix-org/synapse into erikj/perf
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r--synapse/handlers/profile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py
index 71ff78ab23..799faffe53 100644
--- a/synapse/handlers/profile.py
+++ b/synapse/handlers/profile.py
@@ -88,6 +88,9 @@ class ProfileHandler(BaseHandler):
         if target_user != auth_user:
             raise AuthError(400, "Cannot set another user's displayname")
 
+        if new_displayname == '':
+            new_displayname = None
+
         yield self.store.set_profile_displayname(
             target_user.localpart, new_displayname
         )