aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-02 23:20:42 -0700
committerAdam Soltys <[email protected]>2026-10-02 23:20:42 -0700
commitd4d5a8b65dde249bc6eb27b7c120b7f5c9b238fe (patch)
tree127276077dc776827ee73c90bf8166dc27cc03be /src/features/messages.js
parent9e12335231f3fa4c4222bea71c4a1737a15a4994 (diff)
downloadcoinosv3-d4d5a8b65dde249bc6eb27b7c120b7f5c9b238fe.tar.gz
coinosv3-d4d5a8b65dde249bc6eb27b7c120b7f5c9b238fe.zip
Zaps find lightning addresses our relays have pruned
Zapping a post looked the author's lightning address up on our four home relays only. Those prune old events, so anyone whose kind 0 hadn't changed in a while (1776, Brad Mills) came back as "no Lightning address or Ark address" — while their profile page, which also asks the index relays and the author's own relays, showed the address right there. The zap lookup now asks both ways at once and takes whichever carries a lightning address. And when someone does have one but Lightning can't be paid right now, the toast says that instead of claiming they have no address. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VKv2uEFRR42Gp6NyqcN3A9
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 1c0dab8..b0f4526 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -3430,6 +3430,21 @@ export function messagesFeature(ctx) {
return pending;
}
+ // A person's profile the way their profile page finds it: index relays and
+ // their own relays, not just ours. The zap path asks here — a lightning
+ // address on a kind 0 that our relays have long since pruned is still
+ // somebody's lightning address.
+ wallet.deepProfile = async (pk) => {
+ await fetchFullProfile(pk);
+ const m = fullProfiles.get(pk);
+ if (!m || typeof m !== 'object') return null;
+ const str = (v) => (typeof v === 'string' && v.trim() ? v.trim() : null);
+ return {
+ name: str(m.display_name) || str(m.name), picture: str(m.picture), about: str(m.about), nip05: str(m.nip05),
+ lud16: str(m.lud16), lud06: str(m.lud06),
+ };
+ };
+
// Warm a profile PAGE (full kind-0 + latest notes + relay list) before
// anyone taps it, so the page opens complete instead of behind spinners.
// Queued with a small concurrency cap: likely tap-targets only, never a