Skip to content

Conversation

SpiritCroc
Copy link
Contributor

@SpiritCroc SpiritCroc commented Sep 8, 2025

Implement MSC4169

While there is a dedicated API endpoint for redactions, being able to send redactions using the normal send endpoint is useful when using MSC4140 for sending delayed redactions to replicate expiring messages. Currently this would only work on rooms >= v11 but fail with an internal server error on older room versions when setting the redacts field in the content, since older rooms would require that field to be outside of content. We can address this by copying it over if necessary.

Relevant spec at https://spec.matrix.org/v1.8/rooms/v11/#moving-the-redacts-property-of-mroomredaction-events-to-a-content-property

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)

While there is a dedicated API endpoint for redactions, being able to
send redactions using the normal send endpoint is useful when using
MSC-4140 for sending delayed redactions to replicate expiring messages.
Currently this would only work on rooms >= v11 but fail with an internal
server error on older room versions.
@SpiritCroc SpiritCroc requested a review from a team as a code owner September 8, 2025 10:45
@CLAassistant
Copy link

CLAassistant commented Sep 8, 2025

CLA assistant check
All committers have signed the CLA.

@SpiritCroc SpiritCroc force-pushed the redaction-send-compatibility branch from 522e941 to 4964d32 Compare September 8, 2025 10:51
@tulir
Copy link
Contributor

tulir commented Sep 8, 2025

I just remembered I made matrix-org/matrix-spec-proposals#4169 which is basically this, so we should add a /versions flag ("com.beeper.msc4169": true) and maybe an experimental_features config option (msc4169_enabled). I'll also update the MSC to remove mass redaction stuff, as matrix-org/matrix-spec-proposals#4343 makes that unnecessary

Test failures here look like flakes?

@SpiritCroc SpiritCroc changed the title Fix sending redactions on rooms < v11 using the /send endpoint Implement MSC-4169: backwards-compatible send of redactions for rooms < v11 using the /send endpoint Sep 9, 2025
@MadLittleMods MadLittleMods changed the title Implement MSC-4169: backwards-compatible send of redactions for rooms < v11 using the /send endpoint Implement MSC4169: backwards-compatible redaction sending for rooms < v11 using the /send endpoint Sep 9, 2025
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