aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-10 08:35:36 -0700
committerAdam Soltys <[email protected]>2026-10-10 08:35:36 -0700
commit2338345063b0f1c816469401264b0cd0d7b7636b (patch)
treea5a35e4bd7a78e5803e68cd49c44692389691961 /src/features/messages.js
parent42c0ef9c6391285d76825bdf0d29371cd6ebf500 (diff)
downloadcoinosv3-2338345063b0f1c816469401264b0cd0d7b7636b.tar.gz
coinosv3-2338345063b0f1c816469401264b0cd0d7b7636b.zip
Messages: the Amber notice no longer waits for Amber to wake. "Messages sent to you can't be opened here · Connect Amber" showed only once the Amber signer had resumed, and the DM drain is what resumes it — on a phone whose every wrap the old code had already logged as opened, nothing is pending, so nothing might ever ask. nostrLoginIdentity now says how the account came in (`via`), and an Amber account counts as one whether or not its signer is live yet (the notice, and the flag that re-opens written-off wraps once a decrypting signer takes over). tools/amber-dm-upgrade-test.js runs that case with ALL_LOGGED=1.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 28e20f1..be5f785 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -2950,7 +2950,13 @@ export function messagesFeature(ctx) {
const login = hook('nostrLoginIdentity');
return !login || !!(login.signer && !login.signer.interactive && login.signer.decryptFrom);
}
- const interactiveLogin = () => { const l = hook('nostrLoginIdentity'); return !!(l && l.signer && l.signer.interactive); };
+ // an Amber-by-intent account, whether or not its signer has woken yet:
+ // a wallet whose every wrap was already logged never wakes it, and then
+ // never said why its messages were missing
+ const interactiveLogin = () => {
+ const l = hook('nostrLoginIdentity');
+ return !!l && (l.signer ? !!l.signer.interactive : l.via === 'amber');
+ };
// Wraps logged while an interactive signer stood in for the login npub
// may be messages no key here ever tried. Once a signer that can decrypt
// takes over (Amber reconnected over NIP-46), the heal pass re-opens