diff options
| author | Alejandro <alejandrogomez@bitrefill.com> | 2026-03-02 16:01:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-02 12:01:13 -0300 |
| commit | eeb532b5ff936a48caaef8b7540342e0b6795166 (patch) | |
| tree | e1380fc81e5961e8222709c4e9fcd2f176dca267 | |
| parent | 1a4e0988eb6c7b726be9faf8456492a144ff4df8 (diff) | |
feat: add optional emoji set address to emoji tags (#2247)
| -rw-r--r-- | 30.md | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -9,13 +9,14 @@ Custom Emoji | |||
| 9 | Custom 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: | 9 | Custom 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 | ||
| 15 | Where: | 15 | Where: |
| 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 | ||
| 20 | For each emoji tag, clients should parse emoji shortcodes (aka "emojify") like `:shortcode:` in the event to display custom emoji. | 21 | For 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 | ], |