Skip to content

MSC4454: Deprecating Spoiler Fallback In Media Repository#4454

Open
dozro wants to merge 8 commits into
matrix-org:mainfrom
dozro:deprecate-spoiler-plaintext-fallback
Open

MSC4454: Deprecating Spoiler Fallback In Media Repository#4454
dozro wants to merge 8 commits into
matrix-org:mainfrom
dozro:deprecate-spoiler-plaintext-fallback

Conversation

@dozro
Copy link
Copy Markdown

@dozro dozro commented Apr 22, 2026

…ilered text

Signed-off-by: Rye <git@itsrye.dev>
@dozro dozro changed the title MSC0000: Deprecating Spoiler Fallback In Media Repository MSC4454: Deprecating Spoiler Fallback In Media Repository Apr 22, 2026
@dozro dozro marked this pull request as ready for review April 22, 2026 18:36
@tulir tulir added proposal A matrix spec change proposal client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Apr 22, 2026
Comment thread proposals/4454-deprecating-spoiler-fallback-in-media-repository.md Outdated
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.

Implementation requirements:

  • Client that sends the new format defined for body

Comment thread proposals/4454-deprecating-spoiler-fallback-in-media-repository.md Outdated
Updated guidelines for handling spoilered content in messages.
nushea pushed a commit to nushea/Sable-changes that referenced this pull request Apr 23, 2026
…Client#715)

### Description

This pull request updates the plain text conversion logic to better
handle spoilered text, ensuring that spoiler formatting is replaced with
`[Spoiler]` in plain text fallbacks as per
[MSC4454](matrix-org/matrix-spec-proposals#4454).

**Spoiler handling improvements:**

- Spoilered text (delimited by `||`) is now replaced with `[Spoiler]` in
the plain text output, matching the MSC4454 specification.

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).

No AI involved
For example, a notification may display `Alice [Spoiler] in the movie.` rather than including the spoilered text itself.

While this reduces the usefulness of previews, it avoids leaking spoilered content in contexts where it may be displayed without
explicit user interaction (such as push notifications or lockscreen previews).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clients like gomuks already handle this by replacing the whole message in plaintext contexts, for example:

Image

In my opinon this particular trafeoff isn't worth the potential loss of information.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

didn't know that. thanks for the info.

will adjust the MSC as soon as i come to it :3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

probably to something like [Spoiler](text goes here) so that the plain text is still usable while still containing information about it being a spoiler.

Copy link
Copy Markdown
Author

@dozro dozro May 14, 2026

Choose a reason for hiding this comment

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

updated the MSC accordingly in 7e0c276

dozro added 3 commits May 14, 2026 19:46
from `[Spoiler]` to `[Spoiler](spoilered text goes here)` to decrease reliance on rich text rendering

thanks to [Sugaryyyy (Sugaryy_)](https://github.com/Sugaryyyy) for the idea and bringing up that this is default behaviour in SchildiChat Legacy

Signed-off-by: Rye <git@itsrye.dev>
Signed-off-by: Rye <git@itsrye.dev>
Signed-off-by: Rye <git@itsrye.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants