Skip to content

Commit 551bbed

Browse files
committed
Hardcode the user directory to be disabled
1 parent d287251 commit 551bbed

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
@@ -114,7 +114,8 @@ def __init__(self, hs: "HomeServer"):
114114
# Set of server names.
115115
self._is_refreshing_remote_profiles_for_servers: Set[str] = set()
116116

117-
if self.update_user_directory:
117+
# T2B: Disable user directory
118+
if self.update_user_directory and False:
118119
self.notifier.add_replication_callback(self.notify_new_event)
119120

120121
# We kick this off so that we don't have to wait for a change before
@@ -162,6 +163,11 @@ async def search_users(
162163

163164
def notify_new_event(self) -> None:
164165
"""Called when there may be more deltas to process"""
166+
167+
# T2B: Disable user directory
168+
if True:
169+
return
170+
165171
if not self.update_user_directory:
166172
return
167173

@@ -186,6 +192,10 @@ async def handle_local_profile_change(
186192
# FIXME(#3714): We should probably do this in the same worker as all
187193
# the other changes.
188194

195+
# T2B: Disable user directory
196+
if True:
197+
return
198+
189199
if await self.store.should_include_local_user_in_dir(user_id):
190200
await self.store.update_profile_in_user_dir(
191201
user_id, profile.display_name, profile.avatar_url
@@ -195,6 +205,11 @@ async def handle_local_user_deactivated(self, user_id: str) -> None:
195205
"""Called when a user ID is deactivated"""
196206
# FIXME(#3714): We should probably do this in the same worker as all
197207
# the other changes.
208+
209+
# T2B: Disable user directory
210+
if True:
211+
return
212+
198213
await self.store.remove_from_user_dir(user_id)
199214

200215
async def _unsafe_process(self) -> None:

0 commit comments

Comments
 (0)