aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-03 19:21:39 -0700
committerAdam Soltys <[email protected]>2026-08-03 19:21:39 -0700
commita7c45156fb49e26f06a359d79240d328d88a00d5 (patch)
tree7482479de6916ced4652cbcef819dd484705952d /src
parent95c898f91d2f8ea1ef693624a542eb7fa8cadbb9 (diff)
downloadcoinosv3-a7c45156fb49e26f06a359d79240d328d88a00d5.tar.gz
coinosv3-a7c45156fb49e26f06a359d79240d328d88a00d5.zip
Profile: no editable lightning address
Editing it here reads like renaming your coinos account, and for someone using an address from elsewhere it invites breaking their own zaps. The field is gone; an existing address is preserved untouched, and one is filled in from the coinos payment address only when the profile has none, so other clients can still zap them. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi
Diffstat (limited to 'src')
-rw-r--r--src/features/messages.js11
-rw-r--r--src/i18n.js1
2 files changed, 8 insertions, 4 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 27beff9..d93a863 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -887,10 +887,17 @@ export function messagesFeature(ctx) {
let base = {};
try { base = newest ? JSON.parse(newest.content) : {}; } catch {}
const merged = { ...base };
- for (const [k, v] of [['name', e.name], ['about', e.about], ['picture', e.picture], ['lud16', e.lud16]]) {
+ for (const [k, v] of [['name', e.name], ['about', e.about], ['picture', e.picture]]) {
if (v.trim()) merged[k] = v.trim();
else delete merged[k];
}
+ // Not an editable field: someone else's lightning address is theirs to
+ // manage, and editing it here reads like renaming their coinos account.
+ // We only fill one in when the profile has none, so zaps can find them.
+ if (!merged.lud16) {
+ const addr = hook('namesAddress');
+ if (addr) merged.lud16 = addr;
+ }
if (merged.name) merged.display_name = merged.name;
const partial = { kind: 0, content: JSON.stringify(merged), tags: [], created_at: Math.floor(Date.now() / 1000) };
const evt = id.signer instanceof Uint8Array ? finalizeEvent(partial, id.signer) : await id.signer.signEvent(partial);
@@ -919,7 +926,6 @@ export function messagesFeature(ctx) {
name: full.display_name || full.name || '',
about: full.about || '',
picture: full.picture || '',
- lud16: full.lud16 || (hook('namesAddress') || ''),
};
}
const name = displayName(pk);
@@ -963,7 +969,6 @@ export function messagesFeature(ctx) {
field(t('profName'), 'name'),
field(t('profAbout'), 'about'),
field(t('profPicture'), 'picture', 'https://…'),
- field(t('profLud16'), 'lud16', '[email protected]'),
h('button', { class: 'btn-primary btn-block', disabled: ui.profSaving, onClick: saveProfile },
ui.profSaving ? h('span', { class: 'spinner sm' }) : t('save')))
: mine
diff --git a/src/i18n.js b/src/i18n.js
index fe1e70a..c23d950 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -182,7 +182,6 @@ const STR = {
profName: 'Name',
profAbout: 'About',
profPicture: 'Picture URL',
- profLud16: 'Lightning address',
profSaved: 'Profile published',
msgSearching: 'Searching…',
msgNoMatches: 'No matches',