synapse-product/tests
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
..
api Use direct references for configuration variables (part 6). (#10916) 2021-09-29 06:44:15 -04:00
app Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
appservice Fix errors in Synapse logs from unit tests. (#10939) 2021-09-30 11:03:29 -04:00
config Reset global cache state before cache tests. (#11036) 2021-10-12 12:55:33 +00:00
crypto Rewrite the KeyRing (#10035) 2021-06-02 16:37:59 +01:00
events Strip "join_authorised_via_users_server" from join events which do not need it. (#10933) 2021-10-01 11:39:17 -04:00
federation Fix errors in Synapse logs from unit tests. (#10939) 2021-09-30 11:03:29 -04:00
handlers Fix adding excluded users to the private room sharing tables when joining a room (#11143) 2021-10-21 17:48:59 +01:00
http Use direct references for configuration variables (part 6). (#10916) 2021-09-29 06:44:15 -04:00
logging Include exception in json logging (#11028) 2021-10-08 13:08:25 +02:00
module_api Fix errors in Synapse logs from unit tests. (#10939) 2021-09-30 11:03:29 -04:00
push Synapse 1.42.0rc1 (2021-09-01) 2021-09-01 14:58:14 +01:00
replication type-hint HomeserverTestcase.setup_test_homeserver (#10961) 2021-10-01 12:22:47 +01:00
rest Fix setting a user's external_id via the admin API returns 500 and deletes users existing external mappings if that external ID is already mapped (#11051) 2021-10-21 09:52:32 +01:00
scripts Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
server_notices Use direct references for configuration variables (part 6). (#10916) 2021-09-29 06:44:15 -04:00
state Update the MSC3083 support to verify if joins are from an authorized server. (#10254) 2021-07-26 12:17:00 -04:00
storage Correctly exclude users when making a room public or private (#11075) 2021-10-15 15:53:05 +01:00
test_utils Create a constant for a small png image in tests. (#10834) 2021-09-16 12:01:14 -04:00
util Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
server.py Fix-up some type hints in the relations tests. (#11076) 2021-10-14 09:19:35 -04:00
test_distributor.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_event_auth.py Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
test_federation.py Inline _check_event_auth for outliers (#10926) 2021-09-28 15:25:07 +01:00
test_mau.py Revert change to counting of deactivated users towards the monthly active users limit (#11127) 2021-10-20 11:05:29 +01:00
test_metrics.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_phone_home.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_preview.py Ensure each charset is attempted only once during media preview. (#11089) 2021-10-14 18:51:44 +00:00
test_server.py Add reactor to SynapseRequest and fix up types. (#10868) 2021-09-24 11:01:25 +01:00
test_state.py Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00
test_terms_auth.py Flatten the synapse.rest.client package (#10600) 2021-08-17 11:57:58 +00:00
test_test_utils.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_types.py [pyupgrade] tests/ (#10347) 2021-07-13 11:43:15 +01:00
test_visibility.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
unittest.py Fix-up some type hints in the relations tests. (#11076) 2021-10-14 09:19:35 -04:00
utils.py Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00