From 1f4f0ddf26b7aa45f27e16be45a56f40c53f9846 Mon Sep 17 00:00:00 2001
From: DMRobertson
There are five relevant tables that collectively form the "user directory". +Three of them track a master list of all the users we could search for. +The last two (collectively called the "search tables") track who can +see who.
+From all of these tables we exclude three types of local user:
+user_directory
. This contains the user_id, display name and avatar we'll
+return when you search the directory.
user_directory_search
. To be joined to user_directory
. It contains an extra
+column that enables full text search based on user ids and display names.
+Different schemas for SQLite and Postgres with different code paths to match.
user_directory_stream_pos
. When the initial background update to populate
+the directory is complete, we record a stream position here. This indicates
+that synapse should now listen for room changes and incrementally update
+the directory where necessary.
users_in_public_rooms
. Contains associations between users and the public rooms they're in.
+Used to determine which users are in public rooms and should be publicly visible in the directory.
users_who_share_private_rooms
. Rows are triples (L, M, room id)
where L
+is a local user and M
is a local or remote user. L
and M
should be
+different, but this isn't enforced by a constraint.
Synapse admins can enable support for message retention policies on their homeserver. Message retention policies exist at a room level, -- cgit 1.5.1