Skip to content

Stabilize support for sending ephemeral events to application services, as per MSC2409#19758

Open
jason-famedly wants to merge 5 commits intoelement-hq:developfrom
famedly:jason/stabilize-msc2409
Open

Stabilize support for sending ephemeral events to application services, as per MSC2409#19758
jason-famedly wants to merge 5 commits intoelement-hq:developfrom
famedly:jason/stabilize-msc2409

Conversation

@jason-famedly
Copy link
Copy Markdown
Contributor

@jason-famedly jason-famedly commented May 6, 2026

Part of #18118

MSC2409 was merged into the spec on Oct 28, 2024 and is part of Matrix Spec 1.13

This adds the stable identifiers for MSC2409 while maintaining the existing unstable identifier for backwards compatibility. The existing to_device identifiers borrowed from MSC2409 for MSC4203 are also maintained.

(Includes one drive-by removal of a FIXME comment that was no longer needed after May 16, 2022)

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)

@jason-famedly jason-famedly marked this pull request as ready for review May 6, 2026 11:58
@jason-famedly jason-famedly requested a review from a team as a code owner May 6, 2026 11:58
Comment thread synapse/appservice/api.py
Comment on lines +360 to +363
"ephemeral": ephemeral,
# TODO: Update to stable prefixes once MSC4203 completes FCP merge.
# Previously, this was part of MSC2409 which is why it has the
# mismatched unstable identifier
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure how we handled that in the past, but I feel like we should continue sending the unstable identifier to avoid breaking application services which only support the unstable prefix?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmmm. That is fair. Do you think using the change in the configuration setting should be the decider on which identifier should be sent? So that if the config says receive_ephemeral it would provide the stable key, but if it was de.sorunome.msc2409.push_ephemeral it would use the older unstable key? Or do you suppose just sending both each time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gave the first option a try in 5c76d3f.

As a note: the existing code did not do the optional exclusion of the key if there was no relevant data. Would you be interested in that here, or push it to later?

…ugh so the unstable identifier can exist for backwards compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants