Fix bug when rejecting withdrew invite with a third_party_rules module

This commit is contained in:
Mathieu Velten 2024-11-13 14:34:48 +01:00
parent f387f47a6a
commit fabd6fe3e4

View file

@ -269,7 +269,8 @@ class EventContext(UnpersistedEventContextBase):
if self.rejected: if self.rejected:
raise RuntimeError("Attempt to access state_ids of rejected event") raise RuntimeError("Attempt to access state_ids of rejected event")
assert self._state_delta_due_to_event is not None if self._state_delta_due_to_event is None:
return None
prev_state_ids = await self.get_prev_state_ids(state_filter) prev_state_ids = await self.get_prev_state_ids(state_filter)
@ -300,7 +301,8 @@ class EventContext(UnpersistedEventContextBase):
this tuple. this tuple.
""" """
assert self.state_group_before_event is not None if self.state_group_before_event is None:
return {}
return await self._storage.state.get_state_ids_for_group( return await self._storage.state.get_state_ids_for_group(
self.state_group_before_event, state_filter self.state_group_before_event, state_filter
) )