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

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Richard van der Hoff <[email protected]>
  • Loading branch information
erikjohnston and richvdh authored May 24, 2022
1 parent 71907fd commit f9ba81b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ async def _check_for_soft_fail(
event.room_id,
room_version,
state_sets,
event_map={},
event_map=None,
state_res_store=StateResolutionStore(self._store),
)
)
Expand Down
4 changes: 2 additions & 2 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,11 +1028,11 @@ async def create_new_client_event(
for state_id in state_event_ids:
data = metadata.get(state_id)
if data is None:
raise Exception("State event not persisted %s", state_id)
raise Exception(f"State event {state_id} not persisted")

if data.state_key is None:
raise Exception(
"Trying to set non-state event as state: %s", state_id
f"Trying to set non-state event {state_id} as state"
)

state_map[(data.event_type, data.state_key)] = state_id
Expand Down
4 changes: 2 additions & 2 deletions synapse/state/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ async def compute_event_context(
Args:
event:
state_ids_before_event: The event ids of the state at the event if
state_ids_before_event: The event ids of the state before the event if
it can't be calculated from existing events. This is normally
only specified when receiving an event from federation where we
don't have the prev events for, e.g. when backfilling.
don't have the prev events, e.g. when backfilling.
partial_state: True if `state_ids_before_event` is partial and omits
non-critical membership events
Returns:
Expand Down

0 comments on commit f9ba81b

Please sign in to comment.