zaplocker icon indicating copy to clipboard operation
zaplocker copied to clipboard

Use NIP65 to discover the current relays of each nostr pubkey / user

Open heri16 opened this issue 2 years ago • 1 comments

Issue:

Users may move between nostr relays at any time by just changing their relay config in any good nostr client. When they do this, a replaceable event using kind:10002 is sent by the user's nostr client to advertise the preferred relays. This is critical to ensure receiving fresh content from others.

Feature request:

Implement NIP65 on server-side to discover all READ relays where our nostr-user is currently configured / homed / connected to. This is critical to ensure nostr users continue receiving DMs from our server.

From: https://github.com/nostr-protocol/nips/blob/master/65.md#when-to-use-read-and-write

When broadcasting an event, Clients SHOULD: - Broadcast the event to the WRITE relays of the author; - Broadcast the event all READ relays of each tagged user (i.e. Direct Messages).

When seeking events authored by a user, Clients SHOULD use the WRITE relays of the user's kind:10002

When seeking events about a user, where the user was tagged, Clients SHOULD use (and publish to) the READ relays of the user's kind:10002

heri16 avatar Sep 23 '23 20:09 heri16

Since relay operators typically republish kind:10002 notes to other relays, we probably could enhance the User experience by hiding the relay input box if a valid kind:10002 is found on major hubs like wss://relay.damus.io?

heri16 avatar Sep 23 '23 21:09 heri16