Skip to content

Fix private zap toggle not detecting recipient DM relays#202

Merged
barrydeen merged 1 commit intomainfrom
fix/private-zap-dm-relay-fetch
Mar 10, 2026
Merged

Fix private zap toggle not detecting recipient DM relays#202
barrydeen merged 1 commit intomainfrom
fix/private-zap-dm-relay-fetch

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Private zap toggle was disabled unless the recipient's DM relays (kind 10050) were already in the LRU cache, which only happened if you'd previously opened a DM conversation with them
  • Now when the zap dialog opens, if the recipient's DM relays aren't cached, a live fetch is triggered from indexer relays (4s timeout) and the toggle updates reactively via LaunchedEffect
  • Applied to all 5 ZapDialog call sites: feed, thread, article, notifications, and user profile screens

Test plan

  • Open zap dialog on a note from someone you haven't DM'd — private toggle should enable after a brief moment if they have DM relays published
  • Verify private zap toggle still works immediately when relays are already cached
  • Verify private zap toggle stays disabled for users who genuinely have no DM relays
  • Test from thread, article, notification, and profile screens

Previously, private zap toggle was disabled unless the recipient's DM
relays (kind 10050) were already in the LRU cache. Now when the zap
dialog opens, a live fetch is triggered from indexer relays if the
recipient's DM relays aren't cached, and the toggle updates reactively.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@barrydeen barrydeen merged commit 4147656 into main Mar 10, 2026
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.

1 participant