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

Order of mentioned "p" tags in threads #1279

Open
alexgleason opened this issue Jun 1, 2024 · 6 comments
Open

Order of mentioned "p" tags in threads #1279

alexgleason opened this issue Jun 1, 2024 · 6 comments

Comments

@alexgleason
Copy link
Member

I am putting the person being directly replied to as the first "p" tag. It seems other people are doing it in the reverse order. So it results in mentioned names being out of order:

image

Why are we doing that? Is everybody doing that? If so we should spec it.

@alexgleason
Copy link
Member Author

Anyone know the fraternal knowledge here?

@vitorpamplona
Copy link
Collaborator

New tags are generally added at the end of the tag list. So, I would assume people usually do the opposite of what you are doing.

Similar to the order of lists.

@alexgleason
Copy link
Member Author

That makes sense @vitorpamplona, thank you.

Although the person being directly replied to may already exist in the thread, and in that case should be moved to the bottom of the list regardless.

@vitorpamplona
Copy link
Collaborator

Sure, but I expect people to duplicate the p tag in those cases.

@mikedilger
Copy link
Contributor

I don't think the order was ever specified to mean anything. I don't think you can expect other clients to be doing it in any particular way. I could be wrong™

@NfNitLoop
Copy link

NfNitLoop commented Jun 3, 2024

NIP-10 explicitly calls out that the replied-to event should come last. But it also says you should prefer to use marked "e" tags, and explicitly mark events as "root", "reply" or "mention".

Ah, right, that's for "e" tags. I've seen clients intersperse "p" and "e" tags. I assume they keep the same ordering there, so that would point to keeping the replied-to person last in the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants