diff options
| author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2023-07-11 00:15:34 +0900 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2023-07-11 19:59:00 -0300 |
| commit | 00ec0c83ace1353b297b60af6bf519cb2ea04f0e (patch) | |
| tree | f0506f834a138fbd5c851d19b49abd0b11ae966d | |
| parent | a1cd2bd809c6e7476fe1e4dcab78f3a0df22f37d (diff) | |
Add new section Custom Emoji Reaction
| -rw-r--r-- | 25.md | 22 |
1 files changed, 22 insertions, 0 deletions
| @@ -47,3 +47,25 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost | |||
| 47 | ev.sign(privkey: privkey) | 47 | ev.sign(privkey: privkey) |
| 48 | return ev | 48 | return ev |
| 49 | } | 49 | } |
| 50 | ``` | ||
| 51 | |||
| 52 | Custom Emoji Reaction | ||
| 53 | --------------------- | ||
| 54 | |||
| 55 | The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode` in the | ||
| 56 | reaction content. The client should refer to the emoji tag and render the | ||
| 57 | content as an emoji if shortcode is specified. | ||
| 58 | |||
| 59 | ```json | ||
| 60 | { | ||
| 61 | "kind": 7, | ||
| 62 | "content": ":soapbox:", | ||
| 63 | "tags": [ | ||
| 64 | ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"] | ||
| 65 | ], | ||
| 66 | "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6", | ||
| 67 | "created_at": 1682790000 | ||
| 68 | } | ||
| 69 | ``` | ||
| 70 | |||
| 71 | The content can be set only one `:shortcode:`. And emoji tag should be one. | ||