Files
com.wisp.app/app
Barry Deen 426d9353cd feat(private-replies): gift-wrapped reactions + DIP-03 zaps on private replies
Re-enable React and Zap on NIP-17 private replies as private-by-default flows.
Reactions are kind-7 rumors gift-wrapped to every conversation participant + a
self-copy with k=1 to distinguish from existing DM reactions. Zaps reuse the
existing DIP-03 pipeline against the rumor id/created_at, locked private at the
ZapDialog so a public fallback can't leak the rumor id. Repost and Quote remain
hidden — they would publicly attach an e-tag pointing at the encrypted rumor.

- New PrivateReactionPublisher fans out to rumor.pubkey + p-tag participants
  with DM relay + NIP-65 inbox fallback, optimistic local insert dedups against
  the relay-echoed self-copy via deterministic rumor id.
- EventRouter.processGiftWrap dispatches kind-7 rumors by their k tag:
  k=1 routes through eventRepo.addEvent so counts and notifications surface
  alongside public reactions; k=14 (or absent) stays on the DM path.
- SocialActionManager auto-routes reactions and zaps based on
  eventRepo.isPrivate(event.id); v1 is add-only — toggle-off via gift-wrapped
  NIP-09 deletion is a future enhancement.
- ZapDialog gains forcePrivate which hides the anon/private toggles and holds
  isPrivate=true. ActionBar gains zapEnabled so the thread can gray out the
  zap button (with a toast) when the recipient lacks DM relays or the user is
  on a remote signer.
- FlatNotificationItem.isPrivateReaction joins isPrivateReply/isPrivateZap;
  the lock-icon check now ORs all three (retroactively surfaces the lock on
  private zap notifications which had the flag populated but not rendered).
- Rename eventRepo.isPrivateReply -> isPrivate (and markPrivateReply ->
  markPrivate) since the set now tracks any gift-wrap-materialised event.
2026-05-17 12:49:53 -04:00
..