Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 72f3e38

Browse files
authored
Fix possible variable shadow in create_new_client_event (#14575)
1 parent 9ccc09f commit 72f3e38

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

changelog.d/14575.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a possible variable shadow in `create_new_client_event`.

synapse/handlers/message.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,11 +1135,13 @@ async def create_new_client_event(
11351135
)
11361136
state_events = await self.store.get_events_as_list(state_event_ids)
11371137
# Create a StateMap[str]
1138-
state_map = {(e.type, e.state_key): e.event_id for e in state_events}
1138+
current_state_ids = {
1139+
(e.type, e.state_key): e.event_id for e in state_events
1140+
}
11391141
# Actually strip down and only use the necessary auth events
11401142
auth_event_ids = self._event_auth_handler.compute_auth_events(
11411143
event=temp_event,
1142-
current_state_ids=state_map,
1144+
current_state_ids=current_state_ids,
11431145
for_verification=False,
11441146
)
11451147

0 commit comments

Comments
 (0)