From 84e0b44f93c472af022bd4dcd2d72cb8ab2ea74c Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Fri, 22 Aug 2025 17:44:53 +0100 Subject: [PATCH] NIP-25: Add External Content Reactions (#2020) --- 25.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/25.md b/25.md index e0db86a0..7ac4fb18 100644 --- a/25.md +++ b/25.md @@ -45,25 +45,39 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent, hint: S } ``` -Reactions to a website +External Content Reactions --------------------- -If the target of the reaction is a website, the reaction MUST be a `kind 17` event and MUST include an `r` tag with the website's URL. +If the target of a reaction is not a native nostr event, the reaction MUST be a `kind 17` event and MUST include [NIP-73](73.md) external content `k` + `i` tags to properly reference the content. +_Reacting to a website:_ ```jsonc { "kind": 17, "content": "⭐", "tags": [ - ["r", "https://example.com/"] + ["k", "web"], + ["i", "https://example.com"] ], - // other fields... } ``` -URLs SHOULD be [normalized](https://datatracker.ietf.org/doc/html/rfc3986#section-6), so that reactions to the same website are not omitted from queries. -A fragment MAY be attached to the URL, to react to a section of the page. -It should be noted that a URL with a fragment is not considered to be the same URL as the original. +_Reacting to a podcast episode:_ +```jsonc +{ + "kind": 17, + "content": "+", + "tags": [ + ["k", "podcast:guid"], + ["i", "podcast:guid:917393e3-1b1e-5cef-ace4-edaa54e1f810", "https://fountain.fm/show/QRT0l2EfrKXNGDlRrmjL"], + ["k", "podcast:item:guid"], + ["i", "podcast:item:guid:PC20-229", "https://fountain.fm/episode/DQqBg5sD3qFGMCZoSuLF"] + ], +} +``` + + + Custom Emoji Reaction ---------------------