synapse-product/synapse
David Robertson e2a1adbf5d
Allow selecting "prejoin" events by state keys (#14642)
* Declare new config

* Parse new config

* Read new config

* Don't use trial/our TestCase where it's not needed

Before:

```
$ time trial tests/events/test_utils.py > /dev/null

real	0m2.277s
user	0m2.186s
sys	0m0.083s
```

After:
```
$ time trial tests/events/test_utils.py > /dev/null

real	0m0.566s
user	0m0.508s
sys	0m0.056s
```

* Helper to upsert to event fields

without exceeding size limits.

* Use helper when adding invite/knock state

Now that we allow admins to include events in prejoin room state with
arbitrary state keys, be a good Matrix citizen and ensure they don't
accidentally create an oversized event.

* Changelog

* Move StateFilter tests

should have done this in #14668

* Add extra methods to StateFilter

* Use StateFilter

* Ensure test file enforces typed defs; alphabetise

* Workaround surprising get_current_state_ids

* Whoops, fix mypy
2022-12-13 00:54:46 +00:00
..
_scripts Fix a bug introduced in v1.67.0 where not specifying a config file or a server URL would lead to the register_new_matrix_user script failing. (#14637) 2022-12-07 13:39:27 +00:00
api Respond with proper error responses on unknown paths. (#14621) 2022-12-08 11:37:05 -05:00
app Use ClientRestResource on both the main process and workers. (#14528) 2022-12-02 13:10:05 -05:00
appservice Fix missing cache invalidation in application service code (#14670) 2022-12-12 18:13:43 +00:00
config Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00
crypto Stop using deprecated keyIds param on /key/v2/server (#14525) 2022-11-30 11:59:57 +00:00
events Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00
federation Failover on proper error responses. (#14620) 2022-12-06 07:23:03 -05:00
handlers Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00
http Respond with proper error responses on unknown paths. (#14621) 2022-12-08 11:37:05 -05:00
logging Improve logging and opentracing for to-device message handling (#14598) 2022-12-06 09:52:55 +00:00
metrics Fix logging context warnings due to common usage metrics setup (#14574) 2022-11-28 15:25:18 +00:00
module_api Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
push Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
replication Faster remote room joins: unblock tasks waiting for full room state when the un-partial-stating of that room is received over the replication stream. [rei:frrj/streams/unpsr] (#14474) 2022-12-06 15:48:42 +00:00
res Fix html templates to load images only on HTTPS (#14625) 2022-12-08 17:28:02 +00:00
rest Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
server_notices Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
spam_checker_api Fix import in module_api module and docs on the new check_event_for_spam signature (#12918) 2022-05-31 12:04:53 +02:00
state Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
static Add viewport directive to HTML templates to optimise for mobile (#13493) 2022-08-11 14:04:20 +01:00
storage Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00
streams Implement message forward pagination from start when no from is given, fixes #12383 (#14149) 2022-11-24 09:10:51 +00:00
types Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00
util Respond with proper error responses on unknown paths. (#14621) 2022-12-08 11:37:05 -05:00
__init__.py Parse SYNAPSE_ASYNC_IO_REACTOR env variable & log the reactor on startup (#14092) 2022-10-07 15:19:59 +01:00
event_auth.py Revert "Fix event size checks (#13710)" 2022-11-01 11:47:09 +00:00
notifier.py Batch up notifications after event persistence (#14033) 2022-10-05 10:12:48 -07:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
server.py Add a type hint for get_device_handler() and fix incorrect types. (#14055) 2022-11-22 14:08:04 -05:00
visibility.py Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00