mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Truncate npub username
This commit is contained in:
parent
ef5bfb79f0
commit
1ba46dd7a3
1 changed files with 2 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ async function toAccount(event: Event<0>, opts: ToAccountOpts = {}) {
|
||||||
note: lodash.escape(about),
|
note: lodash.escape(about),
|
||||||
fqn: parsed05?.handle || npub,
|
fqn: parsed05?.handle || npub,
|
||||||
url: `${origin}/users/${pubkey}`,
|
url: `${origin}/users/${pubkey}`,
|
||||||
username: parsed05?.nickname || npub,
|
username: parsed05?.nickname || npub.substring(0, 8),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ async function toMention(pubkey: string) {
|
||||||
return {
|
return {
|
||||||
id: pubkey,
|
id: pubkey,
|
||||||
acct: npub,
|
acct: npub,
|
||||||
username: npub,
|
username: npub.substring(0, 8),
|
||||||
url: `${origin}/users/${pubkey}`,
|
url: `${origin}/users/${pubkey}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue