summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-05-31 17:11:18 +0100
committerErik Johnston <erik@matrix.org>2017-05-31 17:11:18 +0100
commitcc7609aa9fe525cc3096c87df2a7f6d090d500ca (patch)
treec57de94f0feebf6544b3467d8fa253b40e4fb1af
parentConvert to int (diff)
downloadsynapse-cc7609aa9fe525cc3096c87df2a7f6d090d500ca.tar.xz
Comment briefly on how we keep user_directory up to date
-rw-r--r--synapse/handlers/user_directory.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py

index 48d3c48181..7130cc6ee3 100644 --- a/synapse/handlers/user_directory.py +++ b/synapse/handlers/user_directory.py
@@ -29,6 +29,16 @@ class UserDirectoyHandler(object): """Handles querying of and keeping updated the user_directory. N.B.: ASSUMES IT IS THE ONLY THING THAT MODIFIES THE USER DIRECTORY + + The user directory is filled with users who this server can see are joined to a + world_readable or publically joinable room. We keep a database table up to date + by streaming changes of the current state and recalculating whether users should + be in the directory or not when necessary. + + For each user in the directory we also store a room_id which is public and that the + user is joined to. This allows us to ignore history_visibility and join_rules changes + for that user in all other public rooms, as we know they'll still be in at least + one public room. """ def __init__(self, hs):