diff options
author | Erik Johnston <erik@matrix.org> | 2023-07-20 10:46:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 10:46:37 +0100 |
commit | ad52db3b5cbf8b78b10a82ce45313c606b244fee (patch) | |
tree | 9c7385a46c430b4abed9adb19c55dd8754e9949c /synapse/handlers/federation.py | |
parent | Ensure a long state res does not starve CPU (#15960) (diff) | |
download | synapse-ad52db3b5cbf8b78b10a82ce45313c606b244fee.tar.xz |
Reduce the amount of state we pull out (#15968)
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 15b9fbe44a..2b93b8c621 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1581,9 +1581,7 @@ class FederationHandler: event.content["third_party_invite"]["signed"]["token"], ) original_invite = None - prev_state_ids = await context.get_prev_state_ids( - StateFilter.from_types([(EventTypes.ThirdPartyInvite, None)]) - ) + prev_state_ids = await context.get_prev_state_ids(StateFilter.from_types([key])) original_invite_id = prev_state_ids.get(key) if original_invite_id: original_invite = await self.store.get_event( @@ -1636,7 +1634,7 @@ class FederationHandler: token = signed["token"] prev_state_ids = await context.get_prev_state_ids( - StateFilter.from_types([(EventTypes.ThirdPartyInvite, None)]) + StateFilter.from_types([(EventTypes.ThirdPartyInvite, token)]) ) invite_event_id = prev_state_ids.get((EventTypes.ThirdPartyInvite, token)) |