aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-15 13:15:45 -0700
committerAdam Soltys <[email protected]>2026-08-15 13:15:45 -0700
commit56cce9d3d6a8efda2bc6a2fc9bd01c55355a8aab (patch)
treeeff9510dd44aebefeaab8f56f035fbc00d4400fe
parent41b308d89bdf04b6990dbfd81b8aa43ebe3c4a03 (diff)
downloadcoinosv3-server-56cce9d3d6a8efda2bc6a2fc9bd01c55355a8aab.tar.gz
coinosv3-server-56cce9d3d6a8efda2bc6a2fc9bd01c55355a8aab.zip
Welcome DMs stop echoing: sent-copies thread under their recipient whichever identity authored them, the registrar keeps no sender copy at all, and the old self-thread residue sweeps itself
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv
-rw-r--r--names/server.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/names/server.js b/names/server.js
index 1b1f4bc..a969bde 100644
--- a/names/server.js
+++ b/names/server.js
@@ -162,11 +162,12 @@ async function sendWelcome(pubkey) {
state.welcomed[pubkey] = Date.now();
persist();
try {
- // wraps for [sender-copy, recipient], each to its owner's inbox
- const [toSelf, toPeer] = wrapManyEvents(WELCOME.sk, [{ publicKey: pubkey }], WELCOME.message);
+ // wrapManyEvents returns [sender-copy, recipient] — publish ONLY the
+ // recipient's wrap. A sender copy per registrant flooded Adam's own
+ // clients with an endless stream of his own welcome message.
+ const [, toPeer] = wrapManyEvents(WELCOME.sk, [{ publicKey: pubkey }], WELCOME.message);
const inbox = await inboxRelaysOf(pubkey);
await Promise.allSettled(pool.publish([...new Set([...inbox, ...LNURL_RELAYS])], toPeer));
- await Promise.allSettled(pool.publish(LNURL_RELAYS, toSelf));
log(`welcome DM sent to ${pubkey.slice(0, 12)}`);
} catch (e) {
log('welcome DM failed: ' + e.message);