-
Notifications
You must be signed in to change notification settings - Fork 621
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
vitorpamplona
wants to merge
6
commits into
nostr-protocol:master
Choose a base branch
from
vitorpamplona:tiny-notes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+35
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
34eeb36
Tiny notes
vitorpamplona 8e63436
Update B1.md
vitorpamplona e0b2dba
Fixes the use of naddr
vitorpamplona 66d05c5
Adds what to do when imeta and og are not present.
vitorpamplona 61ad09c
Adds what to do when the image does not match the hash
vitorpamplona bb5aa3d
Changing to 210 chars because Gigi thinks it is better.
vitorpamplona File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
## 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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.