mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-22 01:25:44 +03:00
Fix bug when rejecting withdrew invite with a third_party_rules module
This commit is contained in:
parent
f387f47a6a
commit
fabd6fe3e4
1 changed files with 4 additions and 2 deletions
|
@ -269,7 +269,8 @@ class EventContext(UnpersistedEventContextBase):
|
|||
if self.rejected:
|
||||
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)
|
||||
|
||||
|
@ -300,7 +301,8 @@ class EventContext(UnpersistedEventContextBase):
|
|||
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(
|
||||
self.state_group_before_event, state_filter
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue