summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-10-21 17:48:59 +0100
committerGitHub <noreply@github.com>2021-10-21 17:48:59 +0100
commit2d91b6256e53a9e60027880b0407bd77cb653ad1 (patch)
treefe4817b30927785da43bfce80cefda17f5360b3a /synapse/api
parentImprove docstrings for methods related to sending EDUs to application service... (diff)
downloadsynapse-2d91b6256e53a9e60027880b0407bd77cb653ad1.tar.xz
Fix adding excluded users to the private room sharing tables when joining a room (#11143)
* We only need to fetch users in private rooms

* Filter out `user_id` at the top

* Discard excluded users in the top loop

We weren't doing this in the "First, if they're our user" branch so this
is a bugfix.

* The caller must check that `user_id` is included

This is in the docstring. There are two call sites:
- one in `_handle_room_publicity_change`, which explicitly checks before calling;
- and another in `_handle_room_membership_event`, which returns early if
  the user is excluded.

So this change is safe.

* Test joining a private room with an excluded user

* Tweak an existing test

* Changelog

* test docstring

* lint
Diffstat (limited to 'synapse/api')
0 files changed, 0 insertions, 0 deletions