synapse/synapse
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
..
_scripts Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
api Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
app Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
appservice Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
config Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
crypto Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
events Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
federation Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
groups Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
handlers Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
http Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
logging Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
metrics [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
module_api Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
push Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
replication Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
res Allow configuration of the oEmbed URLs. (#10714) 2021-08-31 18:37:07 -04:00
rest Add missing type hints to non-client REST servlets. (#10817) 2021-09-15 08:45:32 -04:00
server_notices Improve ServerNoticeServlet to avoid duplicate requests (#10679) 2021-08-27 09:16:40 +00:00
spam_checker_api Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state Add type hints to state handler. (#10482) 2021-07-26 12:49:53 -04:00
static Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
storage Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
streams Add a return type to parse_string. (#10438) 2021-07-21 09:47:56 -04:00
util Add type hints to state database module. (#10823) 2021-09-15 09:54:13 -04:00
__init__.py 1.43.0rc2 2021-09-17 10:43:51 +01:00
event_auth.py Add a constant for m.federate. (#10775) 2021-09-08 10:00:43 -04:00
notifier.py Generics for ObservableDeferred (#10491) 2021-07-28 19:55:50 +00:00
python_dependencies.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
server.py Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
types.py Name the type of token in "Invalid token" messages (#10815) 2021-09-14 11:25:05 +01:00
visibility.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00