upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--30.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/30.md b/30.md
index 54a8b37..c9b9ebe 100644
--- a/30.md
+++ b/30.md
@@ -9,13 +9,14 @@ Custom Emoji
9Custom emoji may be added to **kind 0**, **kind 1**, **kind 7** ([NIP-25](25.md)) and **kind 30315** ([NIP-38](38.md)) events by including one or more `"emoji"` tags, in the form: 9Custom emoji may be added to **kind 0**, **kind 1**, **kind 7** ([NIP-25](25.md)) and **kind 30315** ([NIP-38](38.md)) events by including one or more `"emoji"` tags, in the form:
10 10
11``` 11```
12["emoji", <shortcode>, <image-url>] 12["emoji", <shortcode>, <image-url>, <emoji-set-address>]
13``` 13```
14 14
15Where: 15Where:
16 16
17- `<shortcode>` is a name given for the emoji, which MUST be comprised of only alphanumeric characters and underscores. 17- `<shortcode>` is a name given for the emoji, which MUST be comprised of only alphanumeric characters and underscores.
18- `<image-url>` is a URL to the corresponding image file of the emoji. 18- `<image-url>` is a URL to the corresponding image file of the emoji.
19- `<emoji-set-address>` is an optional address pointer (`kind:pubkey:d-tag`) to the kind 30030 emoji set ([NIP-51](51.md)) the emoji belongs to.
19 20
20For each emoji tag, clients should parse emoji shortcodes (aka "emojify") like `:shortcode:` in the event to display custom emoji. 21For each emoji tag, clients should parse emoji shortcodes (aka "emojify") like `:shortcode:` in the event to display custom emoji.
21 22
@@ -46,7 +47,7 @@ In kind 1 events, the `content` should be emojified.
46 "kind": 1, 47 "kind": 1,
47 "content": "Hello :gleasonator: 😂 :ablobcatrainbow: :disputed: yolo", 48 "content": "Hello :gleasonator: 😂 :ablobcatrainbow: :disputed: yolo",
48 "tags": [ 49 "tags": [
49 ["emoji", "ablobcatrainbow", "https://gleasonator.com/emoji/blobcat/ablobcatrainbow.png"], 50 ["emoji", "ablobcatrainbow", "https://gleasonator.com/emoji/blobcat/ablobcatrainbow.png", "30030:79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6:blobcats"],
50 ["emoji", "disputed", "https://gleasonator.com/emoji/Fun/disputed.png"], 51 ["emoji", "disputed", "https://gleasonator.com/emoji/Fun/disputed.png"],
51 ["emoji", "gleasonator", "https://gleasonator.com/emoji/Gleasonator/gleasonator.png"] 52 ["emoji", "gleasonator", "https://gleasonator.com/emoji/Gleasonator/gleasonator.png"]
52 ], 53 ],