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

sdk: add support to NIP17 relay list #640

Closed
yukibtc opened this issue Nov 21, 2024 · 7 comments
Closed

sdk: add support to NIP17 relay list #640

yukibtc opened this issue Nov 21, 2024 · 7 comments
Milestone

Comments

@yukibtc
Copy link
Member

yukibtc commented Nov 21, 2024

When gossip option is enabled, automatically get NIP17 relay list for sending private DMs.

@yukibtc yukibtc added this to the Release v0.37 milestone Nov 21, 2024
@reyamir
Copy link
Contributor

reyamir commented Nov 22, 2024

I think we can support NIP17 relay list for fetching the gift wrap event too

@reyamir
Copy link
Contributor

reyamir commented Nov 22, 2024

Hi @yukibtc , I wonder are you working on it? I will try implement it on tomorrow and submit a PR

@yukibtc
Copy link
Member Author

yukibtc commented Nov 22, 2024

Hi @yukibtc , I wonder are you working on it? I will try implement it on tomorrow and submit a PR

I'm working on it right now

@yukibtc
Copy link
Member Author

yukibtc commented Nov 22, 2024

Currently, when gossip is enabled, the events are sent to the INBOX and OUTBOX relays, but also to the WRITE ones (the manually added with Client::add_relay or Client::add_write_relay). In your opinion this should happen also with the NIP17?

@reyamir
Copy link
Contributor

reyamir commented Nov 22, 2024

I think we should skip the WRITE relays, only send to NIP17 relays. Unlike normal event, dm event should pretty strict where to stored.

Some clients are social media + direct message both, the WRITE relays maybe isn't related to store dms.

@yukibtc
Copy link
Member Author

yukibtc commented Nov 22, 2024

I think we can support NIP17 relay list for fetching the gift wrap event too

I think I'll always use NIP17 + NIP65 relays to fetch events with gossip enabled. The alternative is to check if exists a Kind::GiftWrap in the Filter, but this will create issues when requesting all events of a public key or getting event by IDs without including the Kind (DMs from NIP17 relays will not be returned).

yukibtc added a commit that referenced this issue Nov 22, 2024
When `gossip` is enabled, automatically discovery NIP17 for sending and or receiving private direct messages

Closes #640

Signed-off-by: Yuki Kishimoto <[email protected]>
yukibtc added a commit that referenced this issue Nov 22, 2024
When `gossip` is enabled, automatically discovery NIP17 for sending and or receiving private direct messages

Closes #640

Signed-off-by: Yuki Kishimoto <[email protected]>
yukibtc added a commit that referenced this issue Nov 22, 2024
When `gossip` is enabled, automatically discovery NIP17 for sending and or receiving private direct messages

Closes #640

Signed-off-by: Yuki Kishimoto <[email protected]>
@yukibtc
Copy link
Member Author

yukibtc commented Nov 22, 2024

I opened the PR #642
I haven't tested it yet. If you have the chance, let me know if you notice any issues.

yukibtc added a commit that referenced this issue Nov 24, 2024
When `gossip` is enabled, automatically discovery NIP17 for sending and or receiving private direct messages

Closes #640

Signed-off-by: Yuki Kishimoto <[email protected]>
yukibtc added a commit that referenced this issue Nov 24, 2024
When `gossip` is enabled, automatically discovery NIP17 for sending and or receiving private direct messages

Closes #640

Signed-off-by: Yuki Kishimoto <[email protected]>
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

2 participants