aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-17 23:15:34 -0700
committerAdam Soltys <[email protected]>2026-08-17 23:15:34 -0700
commit01227f335d53a13fa83654114a7522d47bac0c2b (patch)
tree31a4bcc601512940bbdba94632a2ccb4fef82cbd /src
parent0da19ade16236013dc8c5018f5a36b3f200e866c (diff)
downloadcoinosv3-01227f335d53a13fa83654114a7522d47bac0c2b.tar.gz
coinosv3-01227f335d53a13fa83654114a7522d47bac0c2b.zip
A picked punk publishes its full address: the avatar step stops writing relative paths into kind 0, where they broke real faces on every other client
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src')
-rw-r--r--src/app.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/app.js b/src/app.js
index 459592f..577f7b2 100644
--- a/src/app.js
+++ b/src/app.js
@@ -2830,8 +2830,11 @@ function onboardScreen() {
try {
const addr = featureHook('namesAddress');
// keeping the default still publishes it — their punk should be
- // their face on every nostr client, not just here
- const picture = o.avatar || (me ? 'https://v3.coinos.io/' + punkUrl(me) : undefined);
+ // their face on every nostr client, not just here. A picked punk is
+ // a relative path; kind 0 needs the absolute URL (a relative one
+ // once replaced a real profile picture with a broken string).
+ const picked = o.avatar && !/^https?:/i.test(o.avatar) ? 'https://v3.coinos.io/' + o.avatar : o.avatar;
+ const picture = picked || (me ? 'https://v3.coinos.io/' + punkUrl(me) : undefined);
const fields = { name: addr ? addr.split('@')[0] : undefined, picture };
// Publishing the profile is a nicety — a signer that can't sign
// right now (a sleeping phone bunker) must not trap the wizard.