diff options
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 | ``` | ||