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

Update NIP-10: add 'mention' marker #80

Merged

Conversation

monlovesmango
Copy link
Member

I think that adding a mention marker would eliminate ambiguity for clients supporting both the deprecated and preferred conventions. I also think that this would allow for extensibility in adding new types of event mentions (for example if we want to add context for a note).

just thought I would throw this out there, let me know what you think.

I think that adding a mention marker would eliminate ambiguity for clients supporting both the deprecated and preferred conventions. I also think that this would allow for extensibility in adding new types of event mentions (for example if we want to add context for a note).
@jb55
Copy link
Contributor

jb55 commented Nov 27, 2022

fwiw damus ios's deprecated-nip10 mention parsing code always had a mention marker so this makes sense from the perspective of the damus ios' codebase.

Copy link
Member

@cameri cameri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@Semisol Semisol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
we may also want to do this too for p tags (inherited from post that was replied to, mentioned in post, ...)

@fiatjaf
Copy link
Member

fiatjaf commented Nov 29, 2022

Wait, when I first read this PR's title I thought mention was for the p tags like @eskema had suggested, not the e tags. I don't think it makes sense to include e tags for all the events in a thread, because that will be a giant number of tags that will be unnecessary and confusing for the most part.

I can't prevent you from creating events with dozens of e tags, but I also don't want to encourage people to include that and I don't want newcomers to think this is the proven way to deal with threads.

For me threads can be done with just two e tags: the "root" and the "reply".

@eskema
Copy link
Collaborator

eskema commented Nov 29, 2022

My suggestion was that ALL p and e tags be marked. root, reply or mention, but now I think it's not necessary for p tags at all. e tags should though.

@monlovesmango
Copy link
Member Author

I don't plan to have more than one 'reply' e tag. there may be multiple 'mention' e tags.

mostly want this for scenarios where there is no 'reply' or 'root' e tag, but there is a 'mention' e tag. having the marker 'mention' means there is no ambiguity in this scenario.

@fiatjaf
Copy link
Member

fiatjaf commented Nov 29, 2022

I don't understand. Can you give me a concrete example?

Are you talking about a quoted note, for example?

@monlovesmango
Copy link
Member Author

yes, the 'mention' marker would be for quoted or reposted events. 'mention' marker would not be used for constructing threads.

@fiatjaf
Copy link
Member

fiatjaf commented Nov 29, 2022

Then we should write that on the NIP.

@fiatjaf
Copy link
Member

fiatjaf commented Nov 30, 2022

Looks good to me now.

@vishalxl
Copy link

vishalxl commented Dec 2, 2022

Overall, this does solve the problem of ambiguity that it seeks to solve.

Also, you could add a line or two, explaining how many of root,reply and mention tags are recommended/acceptable for an event. Since there can be only one root, we should just mention that here, that there can't be more than 1 root tags. And also mention that since a reply can be made to only one event at a time, there can't be more than 1 reply tags. and that mentions can be more than one, but they should ideally be kept at minimum required.

@vishalxl
Copy link

vishalxl commented Dec 5, 2022

If a user replies to a top post ( which does not have a parent or any e tag ), then should it be clarified whether there should be a reply tag or a root tag in the replies to that post?

Someone could put both too, as in one each of reply and root tags with the same parent event.

@monlovesmango
Copy link
Member Author

I can add that. IMO it doesn't make sense to have both 'root' and 'reply' marker for top level reply. why would you tag the root event as a 'reply', when it is not a reply to anything?

@vishalxl
Copy link

vishalxl commented Dec 5, 2022

I can add that. IMO it doesn't make sense to have both 'root' and 'reply' marker for top level reply. why would you tag the root event as a 'reply', when it is not a reply to anything?

yeah, its good to clarify it.

@cameri cameri changed the title add 'mention' marker Update NIP-10: add 'mention' marker Dec 10, 2022
@cameri
Copy link
Member

cameri commented Dec 10, 2022

Closed #86 in favor of this PR.

Copy link
Collaborator

@eskema eskema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@monlovesmango monlovesmango mentioned this pull request Dec 14, 2022
@offbyn
Copy link

offbyn commented Jan 14, 2023

I am confused why there could be multiple mentions, if so is the order important again?

and that mentions can be more than one, but they should ideally be kept at minimum required.

what is the usecase of more than 1 mention/quoted event?

just for clarification, by "quoted events" do you mean smth like this?

Screen Shot 2023-01-14 at 10 58 23 AM

@monlovesmango
Copy link
Member Author

monlovesmango commented Jan 14, 2023

yes that is an example of a quoted event but in twitter. use case for multiple mentions is when you want to embed multiple events in your note (like you can do on twitter)

example
image

@vishalxl
Copy link

As I understand, in this mention system as proposed here, a single event can be mentioned by adding it to the tag, and making content something like #[0] where 0 would refer to the mentioned event.

That is basically a repost of the mentioned event; then the NIP 18 which was included with pull request #140 becomes a duplicate of this feature; or they are duplicate features doing same things with two different ways.

Just wanted to state this explicitly, in case I am missing something.

As it is right now, NIP 18 is just duplicating this feature, so it should be deprecated as it is. No need to have two ways of doing same thing.

But Kind 6 can be improved; ( NIP 18) right now says the content field should be empty. If kind 6 content field could contain a whole event json as payload, then kind 6 could become a way to share events when someone is not able to find events from relays, which is going to happen a lot.

Let say your follower can't see the event you reply to, they ask you for it, you reply with kind 6 with content set to that event.

@fiatjaf fiatjaf merged commit f084243 into nostr-protocol:master Jan 15, 2023
@eskema
Copy link
Collaborator

eskema commented Jan 15, 2023

But Kind 6 can be improved; ( NIP 18) right now says the content field should be empty. If kind 6 content field could contain a whole event json as payload, then kind 6 could become a way to share events when someone is not able to find events from relays, which is going to happen a lot.

Let say your follower can't see the event you reply to, they ask you for it, you reply with kind 6 with content set to that event.

i think it would be simpler to simply re-broadcast the original event to your relays where you post the mention / kind-6, so it's also there where they fetch your note referencing it. i get it that it's simple to just re-wrap it, but I feel that it hijacks the original post and keeps a discussion separate from it, which could be a good thing if that's what's expected, so you can talk about an event outside of it, but I don't think that that's the current intent when people use this feature now.

@cameri
Copy link
Member

cameri commented Jan 15, 2023

Quoting a note and repost are NOT the same.

@fiatjaf
Copy link
Member

fiatjaf commented Jan 15, 2023

Having these two things be different kinds is good for clients that want to filter out reposts from original notes of a pubkey, stuff like that.

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

Successfully merging this pull request may close these issues.

8 participants