diff options
author | Shay <hillerys@element.io> | 2022-11-28 19:18:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 19:18:12 -0800 |
commit | 72f3e381375ba10d576a23025ca312397114de6b (patch) | |
tree | 3c3c1d40ddc2a372b0f56e0ef4998bf14ed659b7 | |
parent | Support MSC1767's `content.body` behaviour; Add base rules from MSC3933 (#14524) (diff) | |
download | synapse-72f3e381375ba10d576a23025ca312397114de6b.tar.xz |
Fix possible variable shadow in `create_new_client_event` (#14575)
-rw-r--r-- | changelog.d/14575.misc | 1 | ||||
-rw-r--r-- | synapse/handlers/message.py | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/changelog.d/14575.misc b/changelog.d/14575.misc new file mode 100644 index 0000000000..f6fa54eaa2 --- /dev/null +++ b/changelog.d/14575.misc @@ -0,0 +1 @@ +Fix a possible variable shadow in `create_new_client_event`. \ No newline at end of file diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 4cf593cfdc..5cbe89f4fd 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -1135,11 +1135,13 @@ class EventCreationHandler: ) state_events = await self.store.get_events_as_list(state_event_ids) # Create a StateMap[str] - state_map = {(e.type, e.state_key): e.event_id for e in state_events} + current_state_ids = { + (e.type, e.state_key): e.event_id for e in state_events + } # Actually strip down and only use the necessary auth events auth_event_ids = self._event_auth_handler.compute_auth_events( event=temp_event, - current_state_ids=state_map, + current_state_ids=current_state_ids, for_verification=False, ) |