2023-03-25 14:58:31 +00:00
|
|
|
NIP-18
|
|
|
|
======
|
|
|
|
|
|
|
|
Reposts
|
|
|
|
-------
|
|
|
|
|
2023-11-16 00:42:51 +00:00
|
|
|
`draft` `optional`
|
2023-03-25 14:58:31 +00:00
|
|
|
|
2023-06-16 21:16:42 +00:00
|
|
|
A repost is a `kind 6` event that is used to signal to followers
|
|
|
|
that a `kind 1` text note is worth reading.
|
2023-03-25 14:58:31 +00:00
|
|
|
|
2023-06-18 14:36:23 +00:00
|
|
|
The `content` of a repost event is _the stringified JSON of the reposted note_. It MAY also be empty, but that is not recommended.
|
2023-03-25 14:58:31 +00:00
|
|
|
|
|
|
|
The repost event MUST include an `e` tag with the `id` of the note that is
|
2023-03-29 21:45:12 +00:00
|
|
|
being reposted. That tag MUST include a relay URL as its third entry
|
2023-03-25 14:58:31 +00:00
|
|
|
to indicate where it can be fetched.
|
|
|
|
|
|
|
|
The repost SHOULD include a `p` tag with the `pubkey` of the event being
|
|
|
|
reposted.
|
2023-03-29 21:45:12 +00:00
|
|
|
|
2024-10-02 20:22:52 +00:00
|
|
|
## Generic Reposts
|
|
|
|
|
|
|
|
Since `kind 6` reposts are reserved for `kind 1` contents, we use `kind 16`
|
|
|
|
as a "generic repost", that can include any kind of event inside other than
|
|
|
|
`kind 1`.
|
|
|
|
|
|
|
|
`kind 16` reposts SHOULD contain a `k` tag with the stringified kind number
|
|
|
|
of the reposted event as its value.
|
|
|
|
|
2023-03-29 21:45:12 +00:00
|
|
|
## Quote Reposts
|
|
|
|
|
2024-02-22 19:38:39 +00:00
|
|
|
Quote reposts are `kind 1` events with an embedded `q` tag of the note being
|
|
|
|
quote reposted. The `q` tag ensures quote reposts are not pulled and included
|
|
|
|
as replies in threads. It also allows you to easily pull and count all of the
|
|
|
|
quotes for a post.
|
2023-06-16 21:16:42 +00:00
|
|
|
|
2024-10-02 20:22:52 +00:00
|
|
|
`q` tags should follow the same conventions as NIP 10 `e` tags, with the exception
|
|
|
|
of the `mark` argument. The first argument MAY be either an event id or an address.
|
2023-06-16 21:16:42 +00:00
|
|
|
|
2024-10-02 20:22:52 +00:00
|
|
|
`["q", <event-id-or-address>, <relay-url>, <pubkey>]`
|
2023-06-16 21:16:42 +00:00
|
|
|
|
2024-10-03 16:31:17 +00:00
|
|
|
Quote reposts MUST include the [NIP-19](19.md) `nevent`, `note`, or `naddr` of the
|
2024-10-02 20:22:52 +00:00
|
|
|
event in the content. The embedded entity should match the type of the tag (in
|
|
|
|
other words, if embedding a `naddr`, the `q` tag should contain an address, not
|
|
|
|
an event id).
|
2024-10-02 21:50:10 +00:00
|
|
|
|
|
|
|
Quote reposts also SHOULD include a `k` tag matching the stringified `kind` of
|
|
|
|
the quoted note.
|