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

MSC4140: don't cancel delayed state on own state #17810

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

Conversation

AndrewFerr
Copy link
Member

@AndrewFerr AndrewFerr commented Oct 10, 2024

When a user sends a state event, do not cancel their own delayed events for the same piece of state.

For context, see the relevant section in the MSC.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

When a user sends a state event, do not cancel their own delayed events
for the same piece of state.
@AndrewFerr
Copy link
Member Author

Depends on matrix-org/complement#742 for Complement tests to pass.

@AndrewFerr AndrewFerr marked this pull request as ready for review October 10, 2024 13:55
@AndrewFerr AndrewFerr requested a review from a team as a code owner October 10, 2024 13:55
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Looks good on the whole, just some small points of feedback.

changelog.d/17810.feature Outdated Show resolved Hide resolved
Comment on lines +188 to +194
if delta.event_id is None:
logger.debug(
"Not handling delta for deleted state: %r %r",
delta.event_type,
delta.state_key,
)
continue
Copy link
Member

Choose a reason for hiding this comment

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

Out of interest, would it be worth instead adding an argument to get_partial_current_state_deltas to filter out state deltas that do not have an associated event ID?

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be helpful, yes. Since that's not strictly required for this PR, though, I opened a new one for it: #17833

@AndrewFerr
Copy link
Member Author

The sytests pass when I run them locally. Is there a way to retry their CI runs?

@MadLittleMods
Copy link
Contributor

@AndrewFerr Retried 👍

@AndrewFerr AndrewFerr mentioned this pull request Oct 23, 2024
3 tasks
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.

3 participants