aboutsummaryrefslogtreecommitdiffstats
path: root/tools/notif-faces-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-09 10:13:48 -0700
committerAdam Soltys <[email protected]>2026-10-09 10:13:48 -0700
commitad028dd1c61e41913e4628046b96bf162bc4ba4a (patch)
tree5aceddeaa0e8352d5b58111adc598c335aa3e8cd /tools/notif-faces-test.js
parent479959cdd77fdd18ca03f63af9b94eae291d0e2a (diff)
downloadcoinosv3-ad028dd1c61e41913e4628046b96bf162bc4ba4a.tar.gz
coinosv3-ad028dd1c61e41913e4628046b96bf162bc4ba4a.zip
Accounts: switching no longer leaks the previous identity's notifications and DMs into the next. A notifications query (up to 5 s on the relays) or a wrap mid-decrypt that was still out at the switch landed in the NEW account's list and was saved there under its key — a throwaway account showed adam's zaps, reactions and conversations for good. A session counter bumped in stop() is checked after every await on both paths; notifications only take events p-tagging this identity, and an incoming DM must come from or name it. Healing: notification caches saved before this (no notifsV 2) are dropped once and refetched; a cached DM thread holding a row from someone who is neither us nor the peer is swept. tools/account-switch-leak-test.js (fails on the old code: the reaction and the thread both leak)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3
Diffstat (limited to 'tools/notif-faces-test.js')
-rw-r--r--tools/notif-faces-test.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/notif-faces-test.js b/tools/notif-faces-test.js
index b43a41f..b45b120 100644
--- a/tools/notif-faces-test.js
+++ b/tools/notif-faces-test.js
@@ -75,7 +75,7 @@ try {
const items = ACTORS.map((a, i) => ({ id: 'r'.repeat(63) + i, what: 'react', actor: a.pk, target: 't'.repeat(64), hint: [], emoji: '❤️', ts: now - 60 * (i + 1) }));
await page.evaluate(([k, me, items]) => {
const st = JSON.parse(localStorage.getItem(k + ':messages') || '{}');
- st.notifs = items; st.notifsPk = me;
+ st.notifs = items; st.notifsPk = me; st.notifsV = 2;
localStorage.setItem(k + ':messages', JSON.stringify(st));
}, [base, ME, items]);
await page.reload({ waitUntil: 'domcontentloaded' });