2023-01-28 16:43:29 +01:00
---
2024-06-01 12:07:34 +02:00
title: Spoilers on Matrix protocol
2024-06-19 07:19:44 +02:00
excerpt:
Instructions for proper spoiling on Matrix using FluffyChat, Nheko and Element
Web.
2024-05-18 18:58:57 +02:00
layout: mini
2023-01-28 16:43:29 +01:00
permalink: /n/matrixspoilers.html
redirect_from:
2023-01-28 16:47:42 +01:00
- n/nheko.html
- n/matrixspoiler.html
2024-05-31 05:29:21 +02:00
sitemap: true
2024-05-30 08:05:52 +02:00
lang: en
2024-05-31 05:29:21 +02:00
robots: noai
2023-01-28 16:43:29 +01:00
---
The Matrix specification supports spoilers since version 1.1:
2023-02-22 19:28:38 +01:00
- [Spoiler messages at Client-Server API of Matrix Specification ](https://spec.matrix.org/latest/client-server-api/#spoiler-messages )
2023-01-28 16:43:29 +01:00
2024-11-29 09:37:29 +01:00
<!-- editorconfig - checker - disable -->
<!-- prettier - ignore - start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE - RUN doctoc TO UPDATE -->
< em lang = "fi" > Automaattinen sisällysluettelo< / em > / < em lang = "en" > Automatically generated Table of Contents< / em >
- [Best case scenario ](#best-case-scenario )
- [Manual ](#manual )
- [IRC ](#irc )
- [Related issues ](#related-issues )
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- prettier - ignore - end -->
<!-- editorconfig - checker - enable -->
## Best case scenario
2024-06-19 07:19:44 +02:00
My favourite Matrix clients, FluffyChat and Nheko, support spoilers when the
spoiler is in the following format;
`||Reason why this is a spoiler|Actually spoilered text.||` It can also be
in-line and a spoiler without reason is just `||spoiler goes here||` .
2023-01-28 16:43:29 +01:00
Element Web supports whole message spoilers through the `/spoiler` command.
2024-11-29 09:37:29 +01:00
## Manual
2023-10-26 18:41:00 +02:00
Other clients supporting formatting may have to enter the HTML directly e.g.:
2023-01-28 16:43:29 +01:00
```html
< span data-mx-spoiler = "REASON HERE" > Spoilered text< / span >
```
2024-06-19 07:19:44 +02:00
Some clients, like Nheko, have a `/plain` command to disable formatting for that
message which allows sending this message in plain text to help someone else.
2023-01-28 16:43:29 +01:00
```html
/plain < span data-mx-spoiler = "REASON HERE" > Spoilered text< / span >
```
2024-11-29 09:37:29 +01:00
## IRC
2023-01-28 16:43:29 +01:00
Spoilers are also supported by IRC, but not matrix-appservice-irc.
2023-02-22 19:28:38 +01:00
- [matrix-org/matrix-appservice-irc#1548: Feature request: bridge spoilers to IRC by sending them with the same background&foreground colour (and that to Matrix as spoiler) ](https://github.com/matrix-org/matrix-appservice-irc/issues/1548 )
2024-11-29 09:37:29 +01:00
## Related issues
- [element-hq/element-meta#2424: Implement displaying spoilers in ElementX ](https://github.com/element-hq/element-meta/issues/2424 )
- [element-hq/element-meta#2489: Sending content warnings ](https://github.com/element-hq/element-meta/issues/2479 )
- [element-hq/element-x-ios#2839: Sending content warnings ](https://github.com/element-hq/element-x-ios/issues/2839 )