2023-04-17 12:31:18 -04:00
|
|
|
# NIP-36
|
2022-12-01 18:41:15 -05:00
|
|
|
|
2023-04-17 12:31:18 -04:00
|
|
|
## Sensitive Content / Content Warning
|
2022-12-01 18:41:15 -05:00
|
|
|
|
|
|
|
`draft` `optional` `author:fernandolguevara`
|
|
|
|
|
|
|
|
The `content-warning` tag enables users to specify if the event's content needs to be approved by readers to be shown.
|
|
|
|
Clients can hide the content until the user acts on it.
|
|
|
|
|
2023-04-17 12:31:18 -04:00
|
|
|
### Spec
|
2022-12-01 18:41:15 -05:00
|
|
|
|
2023-04-17 12:31:18 -04:00
|
|
|
```yaml
|
2022-12-01 18:41:15 -05:00
|
|
|
tag: content-warning
|
|
|
|
options:
|
|
|
|
- [reason]: optional
|
|
|
|
```
|
|
|
|
|
2023-04-17 12:31:18 -04:00
|
|
|
### Example
|
2022-12-01 18:41:15 -05:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"pubkey": "<pub-key>",
|
|
|
|
"created_at": 1000000000,
|
|
|
|
"kind": 1,
|
|
|
|
"tags": [
|
|
|
|
["t", "hastag"],
|
|
|
|
["content-warning", "reason"] /* reason is optional */
|
|
|
|
],
|
|
|
|
"content": "sensitive content with #hastag\n",
|
|
|
|
"id": "<event-id>"
|
|
|
|
}
|
|
|
|
```
|