synapse/synapse
Richard van der Hoff 964f29cb6f
Refactor on_receive_pdu code (#10615)
* drop room pdu linearizer sooner

No point holding onto it while we recheck the db

* move out `missing_prevs` calculation

we're going to need `missing_prevs` whatever we do, so we may as well calculate
it eagerly and just update it if it gets outdated.

* Add another `if missing_prevs` condition

this should be a no-op, since all the code inside the block already checks `if
missing_prevs`

* reorder if conditions

This shouldn't change the logic at all.

* Push down `min_depth` read

No point reading it from the database unless we're going to use it.

* Collect the sent_to_us_directly code together

Move the remaining `sent_to_us_directly` code inside the `if
sent_to_us_directly` block.

* Properly separate the `not sent_to_us_directly` branch

Since the only way this second block is now reachable is if we
*didn't* go into the `sent_to_us_directly` branch, we can replace it with a
simple `else`.

* changelog
2021-08-18 12:36:22 +01:00
..
_scripts Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
api When redacting, keep event fields around that maintain the historical event structure intact (MSC2716) (#10538) 2021-08-09 20:23:31 -05:00
app Port the PresenceRouter module interface to the new generic interface (#10524) 2021-08-17 13:22:45 +00:00
appservice Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
config Port the PresenceRouter module interface to the new generic interface (#10524) 2021-08-17 13:22:45 +00:00
crypto Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
events Port the PresenceRouter module interface to the new generic interface (#10524) 2021-08-17 13:22:45 +00:00
federation Validate the max_rooms_per_space parameter to ensure it is non-negative. (#10611) 2021-08-16 12:01:30 -04:00
groups Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
handlers Refactor on_receive_pdu code (#10615) 2021-08-18 12:36:22 +01:00
http Experimental support for MSC3266 Room Summary API. (#10394) 2021-08-16 14:49:12 +00:00
logging Fix PeriodicallyFlushingMemoryHandler inhibiting application shutdown (#10517) 2021-08-03 14:28:30 +01:00
metrics [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
module_api Port the PresenceRouter module interface to the new generic interface (#10524) 2021-08-17 13:22:45 +00:00
push Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
replication Fix up type hints for Twisted 21.7 (#10490) 2021-07-28 12:04:11 +00:00
res/templates Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page #74" from synapse-dinsic (#9832) 2021-04-19 19:16:34 +01:00
rest Remove deprecated Shutdown Room and Purge Room Admin API (#8830) 2021-08-17 21:19:13 +01:00
server_notices Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
spam_checker_api Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state Add type hints to state handler. (#10482) 2021-07-26 12:49:53 -04:00
static Add initial support for a "pick your IdP" page (#9017) 2021-01-05 11:25:28 +00:00
storage Allow to edit external_ids by Edit User admin API (#10598) 2021-08-17 11:56:11 +01:00
streams Add a return type to parse_string. (#10438) 2021-07-21 09:47:56 -04:00
util Manhole: wrap coroutines in defer.ensureDeferred automatically (#10602) 2021-08-16 18:11:48 +01:00
__init__.py 1.40.0 2021-08-10 13:50:58 +01:00
event_auth.py Support MSC3289: Room version 8 (#10449) 2021-08-09 10:46:39 +02:00
notifier.py Generics for ObservableDeferred (#10491) 2021-07-28 19:55:50 +00:00
python_dependencies.py Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
server.py Experimental support for MSC3266 Room Summary API. (#10394) 2021-08-16 14:49:12 +00:00
types.py Add get_userinfo_by_id method to ModuleApi (#9581) 2021-08-04 10:40:25 +00:00
visibility.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00