element-hq / element-hq/synapse
When populating the user directory, query remote servers for user profiles instead of leaking the profiles in private rooms. [rei:userdirpriv]
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#15091](https://github.com/matrix-org/synapse/pull/15091).
---
Fixes: #5677
Follows: #14756
Base: `rei/userdirpriv2_refresh_remotes`
This pull request is commit-by-commit review friendly.
Original commit schedule, with full messages:
-
Rename method to make obvious it only applies to local users
-
Add another temporary table to the user directory background update for storing remote users needing lookup
-
Don't add private remote users straight to the user directory \
Instead, queue them up to be added to the stale profile queue. -
Add a background update stage to sort the remote users into the stale profile queue as appropriate
-
(ugly?) Kick off the fetching of remote profiles once ready
-
When we start populating the user directory, clear out the old tables first if they're there
-
When rebuilding user dir, schedule the new task
-
Schedule a user directory rebuild
### Stacked PR Chain: rei:userdirpriv
| PR | Title | Status | Merges Into |
|:--:|:------|:-------|:-------------:|
|#14755|Preparatory work to fix the user directory assuming that any remote membership state events represent a profile change.||-|
|#14756|Refresh remote profiles that have been marked as stale, in order to fill the user directory.||#14755|
|#15091|👉 *(Draft) When populating the user directory, query remote servers for user profiles instead of leaking the profiles in private rooms.*||#14756|
Contributor guide
Assessment
This issue has not been assessed yet.