damus icon indicating copy to clipboard operation
damus copied to clipboard

Support NIP-10 for client interoperability (thread rendering)

Open ok300 opened this issue 1 year ago • 0 comments

Damus currently uses positional "e" tags to mark the root and the parent in threads.

Other clients like Gossip already support NIP-10^1, which deprecates positional "e" tags in favor of marked tags.

This leads to different rendering across clients for threads or standalone notes referencing another note.


Here is an example.

The note JSON is

{
  "id": "994a81e7d5137c6fb2e663c91d9436aa32c247f1ae5105c34de924b76cdf51f2",
  "pubkey": "00000000827ffaa94bfea288c3dfce4422c794fbb96625b6b31e9049f729d700",
  "created_at": 1675572483,
  "kind": 1,
  "tags": [
    [ "p", "d5bd2aedd006cf7eda5f39a84c0c1bb98e5f9ac97094631b0ef533d67a0d3896" ],
    [ "e", "ec37c20a54921f48586b4314ea324d499c61649d923615f679684f721c4438c7" ]
  ],
  "content": "Follow #[0] if you haven’t yet and stay tuned to all things Nostr Land!\n\n#[1]",
  "sig": "ce5b4c1dbc844b8e7da96f5061be174ea0f46227a5550574cde2bc4f1380f1ba56fa2fb5ce189ecc2a186fd76deffe0483612a72c6f6dbdbdd12a078901eab7b"
}

In Damus, Cameri's comment appears as standalone note referencing another note:

damus-reply

In Gossip, it appears as a reply in a thread:

Screenshot from 2023-02-05 09-19-10

In iris.to it also appears as a reply in a thread:

iris-reply

ok300 avatar Feb 05 '23 08:02 ok300