Skip to content

Commit 01b9fa3

Browse files
committed
Hardcode the user directory to be disabled
1 parent 3151915 commit 01b9fa3

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

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

119120
# We kick this off so that we don't have to wait for a change before
@@ -159,6 +160,11 @@ async def search_users(
159160

160161
def notify_new_event(self) -> None:
161162
"""Called when there may be more deltas to process"""
163+
164+
# T2B: Disable user directory
165+
if True:
166+
return
167+
162168
if not self.update_user_directory:
163169
return
164170

@@ -183,6 +189,10 @@ async def handle_local_profile_change(
183189
# FIXME(#3714): We should probably do this in the same worker as all
184190
# the other changes.
185191

192+
# T2B: Disable user directory
193+
if True:
194+
return
195+
186196
if await self.store.should_include_local_user_in_dir(user_id):
187197
await self.store.update_profile_in_user_dir(
188198
user_id, profile.display_name, profile.avatar_url
@@ -192,6 +202,11 @@ async def handle_local_user_deactivated(self, user_id: str) -> None:
192202
"""Called when a user ID is deactivated"""
193203
# FIXME(#3714): We should probably do this in the same worker as all
194204
# the other changes.
205+
206+
# T2B: Disable user directory
207+
if True:
208+
return
209+
195210
await self.store.remove_from_user_dir(user_id)
196211

197212
async def _unsafe_process(self) -> None:

0 commit comments

Comments
 (0)