Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove recommendation to map emoji reactions to like/dislike #1486

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions 25.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@ Reactions

`draft` `optional`

A reaction is a `kind 7` event that is used to react to other events.
A reaction is a `kind 7` event that is used to indicate user reactions to other events. A
reaction's `content` field MUST include user-generated-content indicating the value of the
reaction.

The generic reaction, represented by the `content` set to a `+` string, SHOULD
be interpreted as a "like" or "upvote".
A reaction with `content` set to `+` or an empty string MUST be interpreted as a "like" or "upvote".
A reaction with `content` set to `-` MUST be interpreted as a "dislike" or "downvote".

A reaction with `content` set to `-` SHOULD be interpreted as a "dislike" or
"downvote". It SHOULD NOT be counted as a "like", and MAY be displayed as a
downvote or dislike on a post. A client MAY also choose to tally likes against
dislikes in a reddit-like system of upvotes and downvotes, or display them as
separate tallies.

The `content` MAY be an emoji, or [NIP-30](30.md) custom emoji in this case it MAY be interpreted as a "like" or "dislike",
or the client MAY display this emoji reaction on the post. If the `content` is an empty string then the client should
consider it a "+".
A reaction with `content` set to an emoji or [NIP-30](30.md) custom emoji SHOULD NOT be interpreted
as a "like" or "dislike". Clients MAY instead display this emoji reaction on the post.
vitorpamplona marked this conversation as resolved.
Show resolved Hide resolved

Tags
----
Expand All @@ -33,7 +28,8 @@ The last `p` tag MUST be the `pubkey` of the event being reacted to.

The `a` tag MUST contain the coordinates (`kind:pubkey:d-tag`) of the replaceable being reacted to.

The reaction event MAY include a `k` tag with the stringified kind number of the reacted event as its value.
The reaction event SHOULD include a `k` tag with the stringified kind number of the reacted event as
its value, and a `c` tag with the reaction's `content` so that reactions can be indexed and filtered.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having c as a sentiment category with values [+, -, 0] for positive, negative and neutral is more useful than simply copying the content.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this mapping come from? If from the client, it doesn't solve anything about assuming user intention. If from the user, then it adds UX friction. If your users want to explain their emojis, that's fine, I just don't think that would be widely adopted.


Example code

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos

| name | value | other parameters | NIP |
| ----------------- | ------------------------------------ | ------------------------------- | ------------------------------------- |
| `c` | category | | [25](25.md) |
| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) |
| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) |
| `a` | coordinates to an event | relay URL | [01](01.md) |
Expand Down