forked-synapse/synapse/handlers
David Robertson 60453315bd
Always add local users to the user directory (#10796)
It's a simplification, but one that'll help make the user directory logic easier
to follow with the other changes upcoming. It's not strictly required for those
changes, but this will help simplify the resulting logic that listens for
`m.room.member` events and generally make the logic easier to follow.

This means the config option `search_all_users` ends up controlling the
search query only, and not the data we store. The cost of doing so is an
extra row in the `user_directory` and `user_directory_search` tables for
each local user which

- belongs to no public rooms
- belongs to no private rooms of size ≥ 2

I think the cost of this will be marginal (since they'll already have entries
 in `users` and `profiles` anyway).

As a small upside, a homeserver whose directory was built with this
change can toggle `search_all_users` without having to rebuild their
directory.

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2021-09-21 12:02:34 +00:00
..
ui_auth Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
account_data.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
account_validity.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
admin.py Use inline type hints in handlers/ and rest/. (#10382) 2021-07-16 18:22:36 +01:00
appservice.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
auth.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
cas.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
deactivate_account.py Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
device.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
devicemessage.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
directory.py Use inline type hints in handlers/ and rest/. (#10382) 2021-07-16 18:22:36 +01:00
e2e_keys.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
e2e_room_keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
event_auth.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
events.py Use inline type hints in handlers/ and rest/. (#10382) 2021-07-16 18:22:36 +01:00
federation_event.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
federation.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
groups_local.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
identity.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
initial_sync.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
message.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
oidc.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
pagination.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
password_policy.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
presence.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
profile.py Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
read_marker.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
receipts.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
register.py Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
room_list.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
room_member_worker.py Implement knock feature (#6739) 2021-06-09 19:39:51 +01:00
room_member.py Allow sending a membership event to unban a user (#10807) 2021-09-21 10:23:34 +00:00
room_summary.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
room.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
saml.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
search.py Use inline type hints in handlers/ and rest/. (#10382) 2021-07-16 18:22:36 +01:00
send_email.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
set_password.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
sso.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
state_deltas.py Easy refactors of the user directory (#10789) 2021-09-10 10:54:38 +01:00
stats.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
sync.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
typing.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
user_directory.py Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00