Replying to Avatar 𝐒𝐧@𝐱

nostr:npub1kun5628raxpm7usdkj62z2337hr77f3ryrg9cf0vjpyf4jvk9r9smv3lhe on the first question you asked to be able to copy the event id. Did you even mean NEvent? Or just the event id (hex)?

Generating a useful 'NEvent` according to the comments requires me to jump through some hoops (getting author 10002 event) so I wonder if it's even worth the effort?

I always thought that a NEvent (from NIP19 docs) is built from the original event only. Because even if you do the extra effort of including the first 3 outbox relays there is no guarantee that that event can be found on those relays. So geeking out on the idea of checking if that event is there before i include that relay. I'm feel like i'm going down the rabbit hole with this one.

From the NIP-19 docs:

So optional. A simpler implementation would be to either:

- only include the relay hint if it was hinted in the e-tag

- include the relay i got the event from (which I'm currently not storing)

Letting this sit for a few days to think about it. I secretly hope you just needed the event id 😃

Nah, I wanted the nevent. Sorry.

Reason is, asknostr.site can't (and shouldn't) display all event kinds that might have been quoted in the original question, or in some of the responses. If users can snag the nevent and paste it into another client, that client will have a much easier time finding and displaying the note with the relay hints than if they search with just the note ID alone.

I don't think e tags would be the route to go. My understanding of them from NIP-10 is that they are referring to some other event that the event in which they are found is referencing, because it is a reply to the tagged event. Therefore, the relay hint found in an e tag is not a relay hint for the event containing the tag, but a hint for finding the event that is being referenced.

I think if you encode the relay that you received the event from into an nevent, that would be sufficient in most cases.

I still think best practice would be to encode the author's outbox relays if the event can be found on them, since that is what the author has proactively indicated to be where they want their notes to be fetched from, and only encode the relay(s) you received the event from if it isn't available from their outbox relays, or they have no 10002. But, there is the ideal practice, and there is what is practical and straightforward to implement and that will do the job in most circumstances, right? 😂

Reply to this note

Please Login to reply.

Discussion

No replies yet.