element-hq / element-hq/synapse
Add configuration option to ignore users_in_public_rooms when searching the User Directory
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
**Description:**
Hi I have a use case for an app that integrates the matrix-rust-sdk as well as this synapse server implementation
We are using public rooms to create a UX where you can share a QR Code that others can scan to join the room
However privacy is a paramount priority and we also are currently accepting the unfortunate side effect that users get added to the `users_in_public_rooms` table. This is not ideal because we want users to be able to:
- search for other users by full matrix ID
- search for other users by display name ONLY if they share private rooms
since we are accepting the side effect, that means users can search by display name and see additional results -- any users who have joined a public room
Our first approach to solve this is to truncate the `users_in_public_rooms` table constantly (every ~5 mins or so) since we have no need for any other functionality associated with that table
We also were considering forking and adding a change server-side where we would simply skip the check to `users_in_public_rooms` in the search API and never returns results inside that table. Alternatively we could avoid ever writing to that table at all when users join public rooms which would be more efficient.
If we were to upstream these changes to this repo, would any of the ideas suggested above be acceptable to the maintainers assuming it were behind a non-default configuration option? For example `ignore_users_in_public_rooms`
Contributor guide
Assessment
This issue has not been assessed yet.