From 00ec0c83ace1353b297b60af6bf519cb2ea04f0e Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 11 Jul 2023 00:15:34 +0900 Subject: [PATCH] Add new section Custom Emoji Reaction --- 25.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/25.md b/25.md index 855f331..7a612a1 100644 --- a/25.md +++ b/25.md @@ -47,3 +47,25 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost ev.sign(privkey: privkey) return ev } +``` + +Custom Emoji Reaction +--------------------- + +The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode` in the +reaction content. The client should refer to the emoji tag and render the +content as an emoji if shortcode is specified. + +```json +{ + "kind": 7, + "content": ":soapbox:", + "tags": [ + ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"] + ], + "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6", + "created_at": 1682790000 +} +``` + +The content can be set only one `:shortcode:`. And emoji tag should be one.