MatrixSynapse/synapse/storage
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
..
controllers Move `StateFilter` to `synapse.types` (#14668) 2022-12-12 16:19:30 +00:00
databases Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00
engines Enable `--warn-redundant-casts` option in mypy (#14671) 2022-12-12 21:25:07 +00:00
schema Rebuild the user directory and stats tables. (#14643) 2022-12-08 11:40:20 -05:00
util Reintroduce #14376, with bugfix for monoliths (#14468) 2022-11-16 22:16:46 +00:00
__init__.py
_base.py Bump flake8-bugbear from 22.9.23 to 22.10.27 (#14329) 2022-11-04 18:43:14 +00:00
background_updates.py Handle half-created indices in receipts index background update (#14650) 2022-12-09 23:02:11 +00:00
database.py Enable `--warn-redundant-casts` option in mypy (#14671) 2022-12-12 21:25:07 +00:00
keys.py
prepare_database.py
push_rule.py
roommember.py
types.py