summary refs log tree commit diff
path: root/synapse/storage/profile.py
diff options
context:
space:
mode:
authorMichael Kaye <1917473+michaelkaye@users.noreply.github.com>2018-12-19 15:42:19 +0000
committerGitHub <noreply@github.com>2018-12-19 15:42:19 +0000
commit9cc95fd0a5cc029ff9da7ed89c5645aa36834485 (patch)
treeb52a3d676e86bcdf3de81826d31f756d7521b946 /synapse/storage/profile.py
parentfix tests (diff)
parenthide_profile: false should mean not to hide the profile :/ (diff)
downloadsynapse-9cc95fd0a5cc029ff9da7ed89c5645aa36834485.tar.xz
Merge pull request #4148 from matrix-org/matthew/red_list dinsic_2018-12-19
add im.vector.hide_profile to user account_data
Diffstat (limited to 'synapse/storage/profile.py')
-rw-r--r--synapse/storage/profile.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/profile.py b/synapse/storage/profile.py

index 10133f0a4a..488e31c8b2 100644 --- a/synapse/storage/profile.py +++ b/synapse/storage/profile.py
@@ -147,12 +147,14 @@ class ProfileWorkerStore(SQLBaseStore): lock=False # we can do this because user_id has a unique index ) - def set_profile_active(self, user_localpart, active, batchnum): + def set_profile_active(self, user_localpart, active, hide, batchnum): values = { "active": int(active), "batch": batchnum, } - if not active: + if not active and not hide: + # we are deactivating for real (not in hide mode) + # so clear the profile. values["avatar_url"] = None values["displayname"] = None return self._simple_upsert(