MSC4193: Spoilers on Media#4193
Conversation
| ## Security considerations | ||
| None, hopefully. | ||
| ## Unstable prefix | ||
| Until this is stable, clients should use `org.matrix.msc4193.spoiler` and `org.matrix.msc4193.spoiler.reason`. |
There was a problem hiding this comment.
org.matrix is reserved for matrix.org, so you'll need to use something like your own domain for the unstable prefix.
There was a problem hiding this comment.
I've updated it to my Codeberg Pages site.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I've added a note about the limitations.
There was a problem hiding this comment.
Implementation requirements:
- Client sending spoilers
- Client respecting spoilers
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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_bodyand therefore theorg.matrix.custom.htmlformat, described above. This makes spoilers valid on anymsgtypewhich 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?
There was a problem hiding this comment.
I'd say that spoilers should be done separately.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
#3725 also provides a way to do spoilers on media.
|
Any news on this? |
|
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:
|
| ## Alternatives | ||
| One alternative is the [Spoilerinator](https://codeberg.org/cf/spoilerinator) tool. However, it depends on HTML, which not all clients implement, and it needs you to copy the media URL, then running the external tool. Additionally, [MSC3725](https://github.com/matrix-org/matrix-spec-proposals/pull/3725) provides a similar way to do this. | ||
| ## Security considerations | ||
| None, hopefully. |
There was a problem hiding this comment.
As any user input, m.spoiler.reason should be pointed out as injectable.
This is the only nit-pick i could see (together with the lack of sign-off), i'm eager to see this proposal adopted and more widely implemented!
turt2live
left a comment
There was a problem hiding this comment.
The core of this MSC is great to see! I've left a couple of comments to give particular bits some attention, though the MSC could do with an editorial pass to ensure it has enough detail for 3rd party implementations and eventual spec writing.
Please also refer to the checklist for other action items. Once completed, let us know in the SCT Office so we can put this back on the to-be-FCP'd list. Thanks!
|
|
||
| In the event that a message has both a spoiler on the body and the image, clients should reveal the spoilers separate from each other. | ||
|
|
||
| In events with an image, video, or audio file, there will be an optional `m.spoiler` field as a boolean. If true, then clients should show a blurred version of the image. If not present, it will be assumed to be false. There will also be a `m.spoiler.reason` field as a text value that will optionally display text for why the image has a spoiler. |
There was a problem hiding this comment.
We have objects available to us, so I'm inclined to use them.
| In events with an image, video, or audio file, there will be an optional `m.spoiler` field as a boolean. If true, then clients should show a blurred version of the image. If not present, it will be assumed to be false. There will also be a `m.spoiler.reason` field as a text value that will optionally display text for why the image has a spoiler. | |
| In events with an image, video, or audio file, there will be an optional `m.spoiler` field. When present, the | |
| client should show a blurred version of the image. If not present or not an object, the image is assumed | |
| unspoilered (like how images are sent today). The object MAY contain an optional `reason` field for a | |
| human-readable reason for the spoiler, like with text spoilers. |
The example then becomes:
{
// ...
"m.spoiler": {
"reason": "This content is hidden" // optional
}
}| "url": "mxc://chat.blahaj.zone/UMjvQObiMNEyMunrldKQVYcT" | ||
| ``` | ||
| ## 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. |
There was a problem hiding this comment.
explaining mitigations for these issues would be good, even if it's to acknowledge that the issue may be unfixable.
There was a problem hiding this comment.
This proposal is lacking appropriate sign off, making it ineligible for FCP. See the included checklist for details.
Rendered
Implementations:
mautrix/discord#189 (mautrix's matrix to discord bridge)
cinnyapp/cinny#2212 (cinny)
SCT Stuff:
No FCP proposed.
MSC checklist