From 23b069d469580c95cb2716167c50abbf957d50d5 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 26 Feb 2025 17:04:45 -0300 Subject: [PATCH] recommend using "k" tag always. --- 25.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/25.md b/25.md index 8c71d471..72109c0f 100644 --- a/25.md +++ b/25.md @@ -31,7 +31,7 @@ The SHOULD be a `p` tag set to the `pubkey` of the event being reacted to. If a If the event being reacted to is an addressable event, an `a` SHOULD be included together with the `e` tag, it must be set to the coordinates (`kind:pubkey:d-tag`) of the event being reacted to. -If the target event is not a `kind:1`, then the reaction MAY include a `k` tag with the stringified kind number of the reacted event as its value. +The reaction SHOULD include a `k` tag with the stringified kind number of the reacted event as its value. **Example code** @@ -39,9 +39,7 @@ If the target event is not a `kind:1`, then the reaction MAY include a `k` tag w func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> NostrEvent { tags.append(["e", liked.id, liked.source_relays.first ?? ""]) tags.append(["p", liked.pubkey]) - if liked.kind != 1 { - tags.append(["k", liked.kind]) - } + tags.append(["k", String(liked.kind)]) let ev = NostrEvent(content: "+", pubkey: pubkey, kind: 7, tags: tags) ev.calculate_id() ev.sign(privkey: privkey)