Skip to content

MSC4193: Spoilers on Media #4193

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

MSC4193: Spoilers on Media #4193

wants to merge 7 commits into from

Conversation

88572
Copy link

@88572 88572 commented Sep 15, 2024

Rendered

Implementations:
mautrix/discord#189 (mautrix's matrix to discord bridge)
cinnyapp/cinny#2212 (cinny)


SCT Stuff:

No FCP proposed.

MSC checklist

## Security considerations
None, hopefully.
## Unstable prefix
Until this is stable, clients should use `org.matrix.msc4193.spoiler` and `org.matrix.msc4193.spoiler.reason`.

Choose a reason for hiding this comment

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

org.matrix is reserved for matrix.org, so you'll need to use something like your own domain for the unstable prefix.

Copy link
Author

Choose a reason for hiding this comment

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

I've updated it to my Codeberg Pages site.

Copy link
Member

Choose a reason for hiding this comment

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

Usually it is fine to use org.matrix in a MSC if you'd like. Just include the MSC # in it.

## Potential issues
A user with malicious intent may put something inappropriate in the reason field.
## Alternatives
One alternative is the [Spoilerinator](https://codeberg.org/cf/spoilerinator) tool.

Choose a reason for hiding this comment

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

I would just clarify what this alternative does and the limitations of it.

From my brief look at it, it uses Matrix HTML to create an interactive/clickable dropdown to view the image.

The limitation of this compared to the MSC would be that not all clients implement HTML, and HTML on mobile clients isn't very good. Additionally this requires a multi-step process of copying the media URL / MXC URI and running this external tool, and most likely doesn't work in encrypted rooms.

Copy link
Author

Choose a reason for hiding this comment

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

I've added a note about the limitations.

@clokep clokep added proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Sep 15, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Implementation requirements:

  • Client sending spoilers
  • Client respecting spoilers

This comment was marked as duplicate.

Choose a reason for hiding this comment

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

Cinny now both respects and supports sending spoilered images. (cinnyapp/cinny#2212)

# MSC4193: Spoilers on Media
This proposal aims to enhance the protocol with more ways to make other users feel comfortable while using the protocol.
Background
Matrix includes a way to add a spoiler to text, which hides the text from visibility without explicit user interaction to show the hidden text. However, there is no official way to do this with images.
Copy link
Contributor

Choose a reason for hiding this comment

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

The existing spoilers work on all message types that support formatted_body and org.matrix.custom.html.

To send spoilers clients MUST use the formatted_body and therefore the org.matrix.custom.html format, described above. This makes spoilers valid on any msgtype which can support this format appropriately.

Since 1.10 images actually fall into that category, too, through their media captions.

So with this proposal it's now possible to have an image itself be behind a spoiler with its caption behind another spoiler. This made me wonder if we'd need some form of UI guidance on how to treat this situation? For instance, should the spoilers be revealed together or separately?

Copy link
Author

Choose a reason for hiding this comment

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

I'd say that spoilers should be done separately.

Copy link
Contributor

@tcpipuk tcpipuk Sep 24, 2024

Choose a reason for hiding this comment

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

I'd imagine most people would want to configure each separately, as the caption may tell people what is inside the image to help them know whether they want to view it?

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds sensible and I think c1e9fb4 has addressed it accordingly.

```
## Potential issues
A user with malicious intent may put something inappropriate in the reason field. Additionally, clients that do not support this feature will show all media without a spoiler.
# Alternatives
Copy link
Contributor

Choose a reason for hiding this comment

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

#3725 also provides a way to do spoilers on media.

Copy link
Author

Choose a reason for hiding this comment

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

I added a note about that.

"h": 473,
"xyz.amorgan.blurhash": "L3TSErUbl9y?u*VEkWnit,tlayWB"
},
"msgtype": "m.image",

Choose a reason for hiding this comment

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

I noticed while adding support for this MSC in Cinny that it does not allow for m.video messages to be spoiled. Is this an intentional omission?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, that was an accidental omission on this one's fault. Videos can be spoiled, however the example event is for an image and the description only states images. It'll try to fix this in a bit.

@Destinyg133
Copy link

Any news on this?

@turt2live turt2live added implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. and removed needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Jul 10, 2025
@turt2live
Copy link
Member

MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands.

SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable.

Checklist:

  • Are appropriate implementation(s) specified in the MSC’s PR description?
  • Are all MSCs that this MSC depends on already accepted?
  • For each new endpoint that is introduced:
    • Have authentication requirements been specified?
    • Have rate-limiting requirements been specified?
    • Have guest access requirements been specified?
    • Are error responses specified?
      • Does each error case have a specified errcode (e.g. M_FORBIDDEN) and HTTP status code?
        • If a new errcode is introduced, is it clear that it is new?
  • Will the MSC require a new room version, and if so, has that been made clear?
    • Is the reason for a new room version clearly stated? For example, modifying the set of redacted fields changes how event IDs are calculated, thus requiring a new room version.
  • Are backwards-compatibility concerns appropriately addressed?
  • Are the endpoint conventions honoured?
    • Do HTTP endpoints use_underscores_like_this?
    • Will the endpoint return unbounded data? If so, has pagination been considered?
    • If the endpoint utilises pagination, is it consistent with the appendices?
  • An introduction exists and clearly outlines the problem being solved. Ideally, the first paragraph should be understandable by a non-technical audience.
  • All outstanding threads are resolved
    • All feedback is incorporated into the proposal text itself, either as a fix or noted as an alternative
  • While the exact sections do not need to be present, the details implied by the proposal template are covered. Namely:
    • Introduction
    • Proposal text
    • Potential issues
    • Alternatives
    • Dependencies
  • Stable identifiers are used throughout the proposal, except for the unstable prefix section
    • Unstable prefixes consider the awkward accepted-but-not-merged state
    • Chosen unstable prefixes do not pollute any global namespace (use “org.matrix.mscXXXX”, not “org.matrix”).
  • Changes have applicable Sign Off from all authors/editors/contributors
  • There is a dedicated "Security Considerations" section which detail any possible attacks/vulnerabilities this proposal may introduce, even if this is "None.". See RFC3552 for things to think about, but in particular pay attention to the OWASP Top Ten.

@github-project-automation github-project-automation bot moved this to Tracking for review in Spec Core Team Workflow Jul 10, 2025
@turt2live turt2live moved this from Tracking for review to Proposed for FCP readiness in Spec Core Team Workflow Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. kind:feature MSC for not-core and not-maintenance stuff proposal A matrix spec change proposal
Projects
Status: Proposed for FCP readiness
Development

Successfully merging this pull request may close these issues.

9 participants