Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when rejecting withdrew invite with a third_party_rules module #17930

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

MatMaul
Copy link
Contributor

@MatMaul MatMaul commented Nov 13, 2024

When rejecting a withdrew invite through federation, an out of band event needs to be created.

When doing so with a third_party_rules module installed, get_prev_state_ids is called on the context to calculate the state to pass at check_event_allowed callbacks.

The context for outliers is defined here, and state_group_before_event is None.

This change makes the behavior of get_prev_state_ids and get_current_state_ids match the one presented in the docstring regarding null state_group.

Pull Request Checklist

@MatMaul MatMaul requested a review from a team as a code owner November 13, 2024 13:56
synapse/events/snapshot.py Outdated Show resolved Hide resolved
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense; just a small change

synapse/events/snapshot.py Outdated Show resolved Hide resolved
@reivilibre reivilibre self-requested a review November 26, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants