diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-09-04 19:12:29 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-09-04 19:12:29 -0400 |
commit | faf72a4c403000f7815d171feb8bf1a83b353584 (patch) | |
tree | d150b317ef4d0cf2245b664a37e51d76c0870352 /synapse/rest/client/v1/profile.py | |
parent | Merge branch 'uhoreg/e2e_cross-signing_merged' into cross-signing_keys (diff) | |
parent | Remove bind_email and bind_msisdn (#5964) (diff) | |
download | synapse-faf72a4c403000f7815d171feb8bf1a83b353584.tar.xz |
Merge branch 'develop' into cross-signing_keys
Diffstat (limited to 'synapse/rest/client/v1/profile.py')
-rw-r--r-- | synapse/rest/client/v1/profile.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/synapse/rest/client/v1/profile.py b/synapse/rest/client/v1/profile.py index 2657ae45bb..bbce2e2b71 100644 --- a/synapse/rest/client/v1/profile.py +++ b/synapse/rest/client/v1/profile.py @@ -48,7 +48,7 @@ class ProfileDisplaynameRestServlet(RestServlet): if displayname is not None: ret["displayname"] = displayname - return (200, ret) + return 200, ret @defer.inlineCallbacks def on_PUT(self, request, user_id): @@ -61,14 +61,14 @@ class ProfileDisplaynameRestServlet(RestServlet): try: new_name = content["displayname"] except Exception: - return (400, "Unable to parse name") + return 400, "Unable to parse name" yield self.profile_handler.set_displayname(user, requester, new_name, is_admin) - return (200, {}) + return 200, {} def on_OPTIONS(self, request, user_id): - return (200, {}) + return 200, {} class ProfileAvatarURLRestServlet(RestServlet): @@ -98,7 +98,7 @@ class ProfileAvatarURLRestServlet(RestServlet): if avatar_url is not None: ret["avatar_url"] = avatar_url - return (200, ret) + return 200, ret @defer.inlineCallbacks def on_PUT(self, request, user_id): @@ -110,14 +110,14 @@ class ProfileAvatarURLRestServlet(RestServlet): try: new_name = content["avatar_url"] except Exception: - return (400, "Unable to parse name") + return 400, "Unable to parse name" yield self.profile_handler.set_avatar_url(user, requester, new_name, is_admin) - return (200, {}) + return 200, {} def on_OPTIONS(self, request, user_id): - return (200, {}) + return 200, {} class ProfileRestServlet(RestServlet): @@ -150,7 +150,7 @@ class ProfileRestServlet(RestServlet): if avatar_url is not None: ret["avatar_url"] = avatar_url - return (200, ret) + return 200, ret def register_servlets(hs, http_server): |