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

Commit b458bd1

Browse files
committed
Fix possible variable shadow in create_new_client_event (#14575)
1 parent 09bef82 commit b458bd1

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
@@ -1198,11 +1198,13 @@ async def create_new_client_event(
11981198
)
11991199
state_events = await self.store.get_events_as_list(state_event_ids)
12001200
# Create a StateMap[str]
1201-
state_map = {(e.type, e.state_key): e.event_id for e in state_events}
1201+
current_state_ids = {
1202+
(e.type, e.state_key): e.event_id for e in state_events
1203+
}
12021204
# Actually strip down and only use the necessary auth events
12031205
auth_event_ids = self._event_auth_handler.compute_auth_events(
12041206
event=temp_event,
1205-
current_state_ids=state_map,
1207+
current_state_ids=current_state_ids,
12061208
for_verification=False,
12071209
)
12081210

0 commit comments

Comments
 (0)