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/message.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/message.py')
-rw-r--r-- | synapse/handlers/message.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 4292b47037..9910716bc6 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -738,7 +738,7 @@ class EventCreationHandler: prev_event_id = state_map.get((EventTypes.Member, event.sender)) else: prev_state_ids = await unpersisted_context.get_prev_state_ids( - StateFilter.from_types([(EventTypes.Member, None)]) + StateFilter.from_types([(EventTypes.Member, event.sender)]) ) prev_event_id = prev_state_ids.get((EventTypes.Member, event.sender)) prev_event = ( @@ -860,7 +860,7 @@ class EventCreationHandler: return None prev_state_ids = await context.get_prev_state_ids( - StateFilter.from_types([(event.type, None)]) + StateFilter.from_types([(event.type, event.state_key)]) ) prev_event_id = prev_state_ids.get((event.type, event.state_key)) if not prev_event_id: |