mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-09 14:12:05 +00:00
Treat setting your display name to the empty string as removing it (SYN-186).
This commit is contained in:
parent
4770cec7bc
commit
67800f7626
@ -88,6 +88,9 @@ class ProfileHandler(BaseHandler):
|
|||||||
if target_user != auth_user:
|
if target_user != auth_user:
|
||||||
raise AuthError(400, "Cannot set another user's displayname")
|
raise AuthError(400, "Cannot set another user's displayname")
|
||||||
|
|
||||||
|
if new_displayname == '':
|
||||||
|
new_displayname = None
|
||||||
|
|
||||||
yield self.store.set_profile_displayname(
|
yield self.store.set_profile_displayname(
|
||||||
target_user.localpart, new_displayname
|
target_user.localpart, new_displayname
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user