There should be at least two refs when replying to a non-root note: first is root, second is immediate reply, and anything inbetween are mentioned notes. It's informal atm but works well.

Reply to this note

Please Login to reply.

Discussion

>There should be at least two refs when replying to a non-root note: first is

>root, second is immediate reply, and anything inbetween are mentioned notes.

>It's informal atm but works well.

OK. So the structure of the e tag is different from NIP-01 which says that the e tag contains only one event id.

You are suggesting that the e tag has n event ids, [root-id, mention1-id, mention2-id, ..., reply-id]

Where root-id refers to an event that has no e tag, and reply-id refers to the event being replied to, which must be

in the chain of replies below the root.

Do I have this right?

Correct

You should also add a p tag so people you're replying to get notified

And should that p tag contain a list of all the authors up to the root?

I see it as a to/cc thing. e tags set up the reply chain but p is used for putting it in their inbox/notifications.

By default I just "reply all" by gathering all p refs in the note you're replying to, but this should be customizable

Is this written down anywhere? (other than here ;-)

No but I think a e/p tag reply best practices doc/nip would be really useful.

More specifically: the pubkey you're replying to is the To: and the p tags in the note you're replying to is Cc:

Then you need to remember to filter yourself out of the Cc's unless you want that for some reason.

On twitter you can add or remove p tags and I'll probably add that to damus as well