Skip to content

Commit

Permalink
Handle missing events
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Mar 14, 2024
1 parent 398408e commit e6d7c5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,9 @@ async def _calculate_state_error(
async def event_id_to_membership(event_id: Optional[str]) -> Optional[str]:
if event_id is None:
return None
event = await self.store.get_event(event_id)
event = await self.store.get_event(event_id, allow_none=True)
if event is None:
return "MISSING_EVENT"
return event.membership

# Check for entries in the calculated state which differ from the actual state.
Expand Down

0 comments on commit e6d7c5e

Please sign in to comment.