diff options
| author | Fernando López Guevara <fernando.lguevara@gmail.com> | 2022-12-01 20:41:15 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-01 20:41:15 -0300 |
| commit | 27c6652e0e682dade7b1ae6b3e329c365a35ea91 (patch) | |
| tree | 7bba03ede7d622687413a49f1fd9199fc975ca69 /36.md | |
| parent | bbc931d02d6233a0906b08d4fb1433db2e78ff36 (diff) | |
NIP-36 - sensitive content / content-warning (#82)
Diffstat (limited to '36.md')
| -rw-r--r-- | 36.md | 34 |
1 files changed, 34 insertions, 0 deletions
| @@ -0,0 +1,34 @@ | |||
| 1 | NIP-36 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Sensitive Content / Content Warning | ||
| 5 | ----------------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fernandolguevara` | ||
| 8 | |||
| 9 | The `content-warning` tag enables users to specify if the event's content needs to be approved by readers to be shown. | ||
| 10 | Clients can hide the content until the user acts on it. | ||
| 11 | |||
| 12 | #### Spec | ||
| 13 | |||
| 14 | ``` | ||
| 15 | tag: content-warning | ||
| 16 | options: | ||
| 17 | - [reason]: optional | ||
| 18 | ``` | ||
| 19 | |||
| 20 | #### Example | ||
| 21 | |||
| 22 | ```json | ||
| 23 | { | ||
| 24 | "pubkey": "<pub-key>", | ||
| 25 | "created_at": 1000000000, | ||
| 26 | "kind": 1, | ||
| 27 | "tags": [ | ||
| 28 | ["t", "hastag"], | ||
| 29 | ["content-warning", "reason"] /* reason is optional */ | ||
| 30 | ], | ||
| 31 | "content": "sensitive content with #hastag\n", | ||
| 32 | "id": "<event-id>" | ||
| 33 | } | ||
| 34 | ``` | ||