upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/36.md
diff options
context:
space:
mode:
Diffstat (limited to '36.md')
-rw-r--r--36.md29
1 files changed, 18 insertions, 11 deletions
diff --git a/36.md b/36.md
index 1223e53..b10262c 100644
--- a/36.md
+++ b/36.md
@@ -4,31 +4,38 @@ NIP-36
4Sensitive Content / Content Warning 4Sensitive Content / Content Warning
5----------------------------------- 5-----------------------------------
6 6
7`draft` `optional` `author:fernandolguevara` 7`draft` `optional`
8 8
9The `content-warning` tag enables users to specify if the event's content needs to be approved by readers to be shown. 9The `content-warning` tag enables users to specify if the event's content needs to be approved by readers to be shown.
10Clients can hide the content until the user acts on it. 10Clients can hide the content until the user acts on it.
11 11
12`l` and `L` tags MAY be also be used as defined in [NIP-32](32.md) with the `content-warning` or other namespace to support
13further qualification and querying.
14
12#### Spec 15#### Spec
13 16
14``` 17```
15tag: content-warning 18tag: content-warning
16options: 19options:
17 - [reason]: optional 20 - [reason]: optional
18``` 21```
19 22
20#### Example 23#### Example
21 24
22```json 25```json
23{ 26{
24 "pubkey": "<pub-key>", 27 "pubkey": "<pub-key>",
25 "created_at": 1000000000, 28 "created_at": 1000000000,
26 "kind": 1, 29 "kind": 1,
27 "tags": [ 30 "tags": [
28 ["t", "hastag"], 31 ["t", "hastag"],
29 ["content-warning", "reason"] /* reason is optional */ 32 ["L", "content-warning"],
30 ], 33 ["l", "reason", "content-warning"],
31 "content": "sensitive content with #hastag\n", 34 ["L", "social.nos.ontology"],
32 "id": "<event-id>" 35 ["l", "NS-nud", "social.nos.ontology"],
36 ["content-warning", "<optional reason>"]
37 ],
38 "content": "sensitive content with #hastag\n",
39 "id": "<event-id>"
33} 40}
34``` 41```