summary refs log tree commit diff
path: root/synapse/static/client/register
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-08-18 12:36:22 +0100
committerGitHub <noreply@github.com>2021-08-18 12:36:22 +0100
commit964f29cb6f4ff5892575ac170aa872822f2c1a0e (patch)
treef8e5b44e9bc9a5f8be41b65d999fd67038266461 /synapse/static/client/register
parentUse auto-attribs for attrs classes for sync. (#10630) (diff)
downloadsynapse-964f29cb6f4ff5892575ac170aa872822f2c1a0e.tar.xz
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
Diffstat (limited to 'synapse/static/client/register')
0 files changed, 0 insertions, 0 deletions