diff options
| author | Adam Soltys <[email protected]> | 2026-10-02 22:37:13 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-02 22:37:13 -0700 |
| commit | 78f8e047f2e94e6065f6041c481387c7e6e20eec (patch) | |
| tree | 67db6b67de5002d86cffc9f74d6e1c0fdd678eb4 /tools | |
| parent | e67666de3c4e2f745c38dfe04ff18e178c17b67c (diff) | |
| download | coinosv3-78f8e047f2e94e6065f6041c481387c7e6e20eec.tar.gz coinosv3-78f8e047f2e94e6065f6041c481387c7e6e20eec.zip | |
White Noise can find a coinos account: relay lists go to its directory relays
The Android app said a coinos user "isn't on White Noise yet" although
their KeyPackage was published: MDK will not invite an account whose
kind 10002 and 10050 lists it cannot find, and it looks on
relay.eu/us.whitenoise.chat and purplepag.es, where coinos never wrote.
The client now passes the account's already-signed lists along to those
relays (no signer needed, nothing rewritten), weekly and until both exist.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/marmot-chat-test.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/marmot-chat-test.js b/tools/marmot-chat-test.js index 1078bec..18f63b3 100644 --- a/tools/marmot-chat-test.js +++ b/tools/marmot-chat-test.js @@ -135,6 +135,16 @@ try { const chk = wn(['keys', 'check', me]); check('wn can use it', !chk.error && JSON.stringify(chk).includes('true'), JSON.stringify(chk).slice(0, 200)); + if (SITE) { + // White Noise only invites an account whose relay lists it can find on ITS relays + const dir = 'wss://relay.eu.whitenoise.chat'; + const found = await until(async () => { + const evs = await new Promise((res) => { const ws = new WebSocket(dir), out = []; ws.onopen = () => ws.send(JSON.stringify(['REQ', 'q', { kinds: [10002, 10050], authors: [me] }])); ws.onmessage = (m) => { const d = JSON.parse(m.data); if (d[0] === 'EVENT') out.push(d[2].kind); else { ws.close(); res(out); } }; ws.onerror = () => res(out); setTimeout(() => res(out), 4000); }); + return evs.includes(10002) && evs.includes(10050); + }, 40000); + check('its relay lists are on the White Noise directory relays', !!found); + } + console.log('\n[a White Noise group invites us]'); const made = wn(['groups', 'create', 'Trail crew', me], alice); check('wn groups create', !made.error, JSON.stringify(made.error || '')); |
