Skip to content

Commit f93f092

Browse files
committed
Hardcode the user directory to be disabled
1 parent 2201883 commit f93f092

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

synapse/handlers/user_directory.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def __init__(self, hs: "HomeServer"):
7070
# Guard to ensure we only process deltas one at a time
7171
self._is_processing = False
7272

73-
if self.update_user_directory:
73+
# T2B: Disable user directory
74+
if self.update_user_directory and False:
7475
self.notifier.add_replication_callback(self.notify_new_event)
7576

7677
# We kick this off so that we don't have to wait for a change before
@@ -109,6 +110,11 @@ async def search_users(
109110

110111
def notify_new_event(self) -> None:
111112
"""Called when there may be more deltas to process"""
113+
114+
# T2B: Disable user directory
115+
if True:
116+
return
117+
112118
if not self.update_user_directory:
113119
return
114120

@@ -133,6 +139,10 @@ async def handle_local_profile_change(
133139
# FIXME(#3714): We should probably do this in the same worker as all
134140
# the other changes.
135141

142+
# T2B: Disable user directory
143+
if True:
144+
return
145+
136146
if await self.store.should_include_local_user_in_dir(user_id):
137147
await self.store.update_profile_in_user_dir(
138148
user_id, profile.display_name, profile.avatar_url
@@ -142,6 +152,11 @@ async def handle_local_user_deactivated(self, user_id: str) -> None:
142152
"""Called when a user ID is deactivated"""
143153
# FIXME(#3714): We should probably do this in the same worker as all
144154
# the other changes.
155+
156+
# T2B: Disable user directory
157+
if True:
158+
return
159+
145160
await self.store.remove_from_user_dir(user_id)
146161

147162
async def _unsafe_process(self) -> None:

0 commit comments

Comments
 (0)