Skip to content

Commit

Permalink
Hardcode the user directory to be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Jan 31, 2023
1 parent 7363f39 commit 3f58672
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion synapse/handlers/user_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def __init__(self, hs: "HomeServer"):
# Guard to ensure we only process deltas one at a time
self._is_processing = False

if self.update_user_directory:
# T2B: Disable user directory
if self.update_user_directory and False:
self.notifier.add_replication_callback(self.notify_new_event)

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

def notify_new_event(self) -> None:
"""Called when there may be more deltas to process"""

# T2B: Disable user directory
if True:
return

if not self.update_user_directory:
return

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

# T2B: Disable user directory
if True:
return

if await self.store.should_include_local_user_in_dir(user_id):
await self.store.update_profile_in_user_dir(
user_id, profile.display_name, profile.avatar_url
Expand All @@ -142,6 +152,11 @@ async def handle_local_user_deactivated(self, user_id: str) -> None:
"""Called when a user ID is deactivated"""
# FIXME(#3714): We should probably do this in the same worker as all
# the other changes.

# T2B: Disable user directory
if True:
return

await self.store.remove_from_user_dir(user_id)

async def _unsafe_process(self) -> None:
Expand Down

0 comments on commit 3f58672

Please sign in to comment.