synapse-product/synapse/storage
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
..
databases Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
engines Fix the inbound PDU metric (#10279) 2021-06-30 12:07:16 +01:00
schema Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
util Speed up MultiWriterIdGenerator when lots of IDs are in flight. (#10755) 2021-09-03 18:23:46 +01:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.py Remove unnecessary SystemRandom from SQLBaseStore (#9987) 2021-05-14 10:59:10 +01:00
background_updates.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
database.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
persist_events.py Generics for ObservableDeferred (#10491) 2021-07-28 19:55:50 +00:00
prepare_database.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
purge_events.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
push_rule.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
relations.py Name the type of token in "Invalid token" messages (#10815) 2021-09-14 11:25:05 +01:00
roommember.py Do not include rooms with an unknown room version in a sync response. (#10644) 2021-08-19 11:12:55 -04:00
state.py Add type hints to state database module. (#10823) 2021-09-15 09:54:13 -04:00
types.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00