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

Tiny notes (210 max chars) #1710

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
35 changes: 35 additions & 0 deletions B1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
NIP-B1
======

Tiny Notes
----------

`draft` `optional`

This NIP defines `kind:25` as a simple plaintext note that is limited to 210 **visible** characters.

The `.content` property contains some human-readable text.

Clients MUST force outgoing `.content` to be less or equal to 210 characters and crop all incoming events to the same amount. Relays MUST also not accept content with over 210 chars, considering the rules below.

Markup languages such as markdown MUST NOT be used.

Replies to `kind:25` MUST use [NIP-22](22.md) comments while applying the same content rules as defined here.

Reactions MUST use [NIP-25](25.md) with a `k` tag to `25`. Clients MUST only download and display reactions that include the `k` tag in notifications.

Zap Events MUST also include the `k` tag of the source event. Clients MUST only render zaps that include the `k` tag in notifications.
Copy link
Member

Choose a reason for hiding this comment

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

We need to update NIP-57 to allow for this; many zappers don't accept the 9734 if it has a tag they don't like, I ended up having to remove k tag from Olas zaps.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We will need to make this work. Otherwise all clients will see all the other clients notifications and it will just confuse users.


## Cached Information

Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 210-char limit.

User citations MUST use a variation of [NIP-19](NIP-19)'s `nostr:nprofile` urls with a `4`th TLV type that receives the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged-in user wants to notify the tagged user.

Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be added to all quoted events.

Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used.

Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode. If the `imeta` tags are not present, images MUST not be previewed and stay as a link. If the `x` hash doesn't match the file, the image should not be previewed.

Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode. If the open graph tags are not present, url MUST not be previewed and stay as a link.