From 0fb0496109aee2ec0bb0c46f29f17392138978e8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 15 Aug 2026 19:16:42 -0700 Subject: A new name offers its hand to the address: saving a renamed profile proposes the matching @coinos.io, and any rename repoints the kind-0 lightning address so zaps never chase a released name Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv --- src/features/names.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/features/names.js') diff --git a/src/features/names.js b/src/features/names.js index f386a47..b021956 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -78,6 +78,10 @@ export function namesFeature(ctx) { save({ name, domain: DOMAIN, uri, offerPk: hook('nwcOfferPubkey') || null, updated: Date.now() }); if (prev && prev !== name) { post('/register', 'DELETE', { name: prev, domain: DOMAIN }).catch(() => {}); + // the old address just died — a kind 0 still pointing at it would send + // zaps into the void, so the profile's lud16 follows the rename + // (messages only touches it if it pointed at the released name) + Promise.resolve(hook('addressRenamed', `${prev}@${DOMAIN}`, `${name}@${DOMAIN}`)).catch(() => {}); } return j; } -- cgit v1.2.3