diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-08-18 12:36:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 12:36:22 +0100 |
commit | 964f29cb6f4ff5892575ac170aa872822f2c1a0e (patch) | |
tree | f8e5b44e9bc9a5f8be41b65d999fd67038266461 /synapse/config/emailconfig.py | |
parent | Use auto-attribs for attrs classes for sync. (#10630) (diff) | |
download | synapse-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/config/emailconfig.py')
0 files changed, 0 insertions, 0 deletions