Skip to content

Commit

Permalink
Merge branch 'develop' into msc4174
Browse files Browse the repository at this point in the history
  • Loading branch information
MatMaul authored Dec 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents c029e9a + 5cf74c2 commit 20f4a31
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/17930.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug when rejecting withdrew invite with a third_party_rules module, where the invite would be stuck for the client.
10 changes: 5 additions & 5 deletions synapse/events/snapshot.py
Original file line number Diff line number Diff line change
@@ -248,21 +248,20 @@ def state_group(self) -> Optional[int]:
@tag_args
async def get_current_state_ids(
self, state_filter: Optional["StateFilter"] = None
) -> Optional[StateMap[str]]:
) -> StateMap[str]:
"""
Gets the room state map, including this event - ie, the state in ``state_group``
It is an error to access this for a rejected event, since rejected state should
not make it into the room state. This method will raise an exception if
``rejected`` is set.
It is also an error to access this for an outlier event.
Arg:
state_filter: specifies the type of state event to fetch from DB, example: EventTypes.JoinRules
Returns:
Returns None if state_group is None, which happens when the associated
event is an outlier.
Maps a (type, state_key) to the event ID of the state event matching
this tuple.
"""
@@ -300,7 +299,8 @@ async def get_prev_state_ids(
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
)

0 comments on commit 20f4a31

Please sign in to comment.