summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-20 16:59:59 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-20 16:59:59 +0100
commited6742cb30b8d1494890047b903c8a540b9ac554 (patch)
tree7e43305dc57ef0072dc08481f87317dcae936f33 /synapse/handlers
parentMerge commit '7932d4e9f' into anoa/dinsic_release_1_31_0 (diff)
parentFix `UsersListTestCase` (#8964) (diff)
downloadsynapse-ed6742cb30b8d1494890047b903c8a540b9ac554.tar.xz
Merge commit 'c9c1c9d82' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/user_directory.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py

index 3d80371f06..7c4eeaaa5e 100644 --- a/synapse/handlers/user_directory.py +++ b/synapse/handlers/user_directory.py
@@ -113,9 +113,13 @@ class UserDirectoryHandler(StateDeltasHandler): """ # FIXME(#3714): We should probably do this in the same worker as all # the other changes. - is_support = await self.store.is_support_user(user_id) + # Support users are for diagnostics and should not appear in the user directory. - if not is_support: + is_support = await self.store.is_support_user(user_id) + # When change profile information of deactivated user it should not appear in the user directory. + is_deactivated = await self.store.get_user_deactivated_status(user_id) + + if not (is_support or is_deactivated): await self.store.update_profile_in_user_dir( user_id, profile.display_name, profile.avatar_url )