You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add NIP-17 kind 10050 (DM relay list) support for reliable cross-client DM delivery #43
Vector does not implement NIP-17 kind 10050 (DM relay list) support. This means:
No publishing: Vector never publishes a kind 10050 event to advertise where it receives DMs
No fetching: Vector never looks up a recipient's kind 10050 to discover their preferred DM inbox relays
No targeted routing: DM gift wraps are broadcast to all pool relays via client.gift_wrap() instead of being sent to the recipient's preferred relays
Current behavior
message/sending.rs:852 — DM sends use client.gift_wrap() which broadcasts to all connected pool relays
Cross-client DMs (e.g. with 0xchat) only work if there happens to be relay overlap (e.g. relay.damus.io)
If a recipient uses DM-specific inbox relays (common with NIP-17 compliant clients), messages may never arrive
Evidence that targeted delivery is already possible
gift_wrap_to() is already used in Vector for:
Typing indicators → commands/realtime.rs:50
WebXDC peer ads → commands/realtime.rs:137
The same pattern should be applied to DM message sends.
Proposed Solution
Publish kind 10050 on login/relay config change — advertise Vector's connected relays as DM inbox relays
Fetch recipient's kind 10050 before sending a DM — look up their preferred DM relays
Use client.gift_wrap_to(recipient_dm_relays, ...) instead of client.gift_wrap(...) for DM sends
Fallback: if no kind 10050 is found for the recipient, fall back to current broadcast behavior
Impact
Without this, DM interoperability with other NIP-17 compliant clients (0xchat, etc.) is unreliable and depends on coincidental relay overlap rather than proper protocol-level relay discovery.
Activity
JSKitty commentedon Feb 9, 2026
Greatly appreciate you creating this issue! This has been on my mental roadmap for some time, it's a good reminder. 🙏
We'll likely use a semi-aggressive caching strategy for DM relay lists for performance (a TTL of 10-15 minutes?), I will keep this request in mind.
alltheseas commentedon Feb 9, 2026
I'll submit a pr for your consideration later today