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 Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
test_cas.py
test_device.py
test_directory.py Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
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 Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
test_register.py Clean-up registration tests (#10945) 2021-09-30 14:06:02 -04:00
test_room.py Pull out encrypted_by_default tests from user_directory tests (#10752) 2021-09-06 11:37:54 +01:00
test_room_summary.py Ignore rooms with unknown room versions in the spaces summary. (#10727) 2021-09-01 17:01:08 +00:00
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 Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
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