MatrixSynapse/tests/handlers
David Robertson 2d91b6256e
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
2021-10-21 17:48:59 +01:00
..
__init__.py
oidc_test_key.p8
oidc_test_key.pub.pem
test_admin.py
test_appservice.py
test_auth.py
test_cas.py Rename handler and config modules which end in handler/config. (#9816) 2021-04-20 14:55:20 -04:00
test_device.py
test_directory.py
test_e2e_keys.py
test_e2e_room_keys.py
test_federation.py Fix 500 error on `/messages` when we accumulate more than 5 backward extremities (#11027) 2021-10-14 18:53:45 -05:00
test_message.py
test_oidc.py
test_password_providers.py Port the Password Auth Providers module interface to the new generic interface (#10548) 2021-10-13 11:21:52 +00:00
test_presence.py
test_profile.py Use direct references for configuration variables (part 7). (#10959) 2021-10-04 07:18:54 -04:00
test_receipts.py
test_register.py Clean-up registration tests (#10945) 2021-09-30 14:06:02 -04:00
test_room.py
test_room_summary.py
test_saml.py
test_send_email.py
test_stats.py Don't drop user dir deltas when server leaves room (#10982) 2021-10-06 12:56:45 +00:00
test_sync.py
test_typing.py
test_user_directory.py Fix adding excluded users to the private room sharing tables when joining a room (#11143) 2021-10-21 17:48:59 +01:00