From cae7dcfbf8e1222f496cee003a436f24d5a43686 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 15 Aug 2026 15:59:35 -0700 Subject: Your profile knows it's yours even when the keys are elsewhere — ownership follows the identity the header wears, not just the loaded signer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv --- src/app.js | 4 ++++ src/features/messages.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index af7421d..0bbf857 100644 --- a/src/app.js +++ b/src/app.js @@ -4068,6 +4068,10 @@ const ctx = { // full sign-out (distinct from the padlock's lock-in-place): clear the // session and leave — offering a password if none protects the vault yet logout: () => { lock({ offerPassword: true }); }, + // the identity the header avatar currently wears (login > seed key > + // remembered) — profile "mine"-ness must match what the user clicked + shownPubkey: () => (featureHook('nostrLoginIdentity') || {}).pubkey + || (wallet.nostrPubkey && wallet.nostrPubkey()) || (activeAccount() || {}).nostrPk || null, getAccount: () => accountSel(), setAccount: (a, dir) => setAccountSel(a, dir), // Open (or create) a wallet from a mnemonic — used by nostr login. diff --git a/src/features/messages.js b/src/features/messages.js index a6cc1e1..1edcba3 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -1363,7 +1363,7 @@ export function messagesFeature(ctx) { function profileScreen() { const pk = ui.profilePk; - const mine = isMe(pk); + const mine = isMe(pk) || (ctx.shownPubkey && pk === ctx.shownPubkey()); const full = fullProfiles.get(pk); // Your own profile IS the editor — the form appears prefilled as soon as // the published kind 0 arrives, no Edit step. -- cgit v1.2.3