Why Nostr? What is Njump?
2024-06-21 22:35:14

npub178…n5ccf on Nostr: commit 3834c6b60474a677b53847743212df27710e64ec Author: Vitor Pamplona ...

commit 3834c6b60474a677b53847743212df27710e64ec
Author: Vitor Pamplona <[email protected]>
Date: Sat May 4 16:10:13 2024 -0400

Simplifying reactions

diff --git a/25.md b/25.md
index 3b4aa59..bdee066 100644
--- a/25.md
+++ b/25.md
@@ -25,14 +25,13 @@ consider it a "+".
Tags
----

-The reaction event SHOULD include `e` and `p` tags from the note the user is
-reacting to. This allows users to be notified of reactions to posts they were
-mentioned in. Including the `e` tags enables clients to pull all the reactions
-associated with individual posts or all the posts in a thread.
+The reaction event SHOULD include `e` and `p` tags pointing to the note the user is
+reacting to. The `p` tag allows authors to be notified. The `e` tags enables clients
+to pull all the reactions to individual posts.

-The last `e` tag MUST be the `id` of the note that is being reacted to.
+The `e` tag MUST be the `id` of the note that is being reacted to.

-The last `p` tag MUST be the `pubkey` of the event being reacted to.
+The `p` tag MUST be the `pubkey` of the event being reacted to.

The reaction event MAY include a `k` tag with the stringified kind number
of the reacted event as its value.
@@ -41,9 +40,6 @@ Example code

```swift
func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> NostrEvent {
- var tags: [[String]] = liked.tags.filter {
- tag in tag.count >= 2 && (tag[0] == "e" || tag[0] == "p")
- }
tags.append(["e", liked.id])
tags.append(["p", liked.pubkey])
tags.append(["k", liked.kind])
Author Public Key
npub178gswwe68tttrjq274vaay86mcrqz8vnn22mrpuu0g788wvnmyvszn5ccf