File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1+ Fix bug when rejecting withdrew invite with a third_party_rules module, where the invite would be stuck for the client.
Original file line number Diff line number Diff line change @@ -248,21 +248,20 @@ def state_group(self) -> Optional[int]:
248248 @tag_args
249249 async def get_current_state_ids (
250250 self , state_filter : Optional ["StateFilter" ] = None
251- ) -> Optional [ StateMap [str ] ]:
251+ ) -> StateMap [str ]:
252252 """
253253 Gets the room state map, including this event - ie, the state in ``state_group``
254254
255255 It is an error to access this for a rejected event, since rejected state should
256256 not make it into the room state. This method will raise an exception if
257257 ``rejected`` is set.
258258
259+ It is also an error to access this for an outlier event.
260+
259261 Arg:
260262 state_filter: specifies the type of state event to fetch from DB, example: EventTypes.JoinRules
261263
262264 Returns:
263- Returns None if state_group is None, which happens when the associated
264- event is an outlier.
265-
266265 Maps a (type, state_key) to the event ID of the state event matching
267266 this tuple.
268267 """
@@ -300,7 +299,8 @@ async def get_prev_state_ids(
300299 this tuple.
301300 """
302301
303- assert self .state_group_before_event is not None
302+ if self .state_group_before_event is None :
303+ return {}
304304 return await self ._storage .state .get_state_ids_for_group (
305305 self .state_group_before_event , state_filter
306306 )
You can’t perform that action at this time.
0 commit comments