diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-11-04 23:46:11 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-11-04 23:46:11 +0000 |
commit | ae5bb32ad0d50b90c5d3833e132dc4ba58a4eb86 (patch) | |
tree | 5cacd32ff8e8136348a2a143d0e5376699d5184f /synapse/rest/client | |
parent | fix tests (diff) | |
download | synapse-ae5bb32ad0d50b90c5d3833e132dc4ba58a4eb86.tar.xz |
add im.vector.hide_profile to user account_data
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/v2_alpha/account_data.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/account_data.py b/synapse/rest/client/v2_alpha/account_data.py index 371e9aa354..2d4d984275 100644 --- a/synapse/rest/client/v2_alpha/account_data.py +++ b/synapse/rest/client/v2_alpha/account_data.py @@ -47,6 +47,11 @@ class AccountDataServlet(RestServlet): body = parse_json_object_from_request(request) + if account_data_type == "im.vector.hide_profile": + user = UserID.from_string(user_id) + hide_profile = body.get('hide_profile') + yield self._profile_handler.set_active(user, hide_profile, True) + max_id = yield self.store.add_account_data_for_user( user_id, account_data_type, body ) |