mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Improve fqn
This commit is contained in:
parent
46cdda7f7f
commit
dcf6b69501
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ function parseContent(event: Event<0>): MetaContent {
|
|||
function toAccount(event: Event<0>) {
|
||||
const { pubkey } = event;
|
||||
const { name, nip05, picture, banner, about }: MetaContent = parseContent(event);
|
||||
const { host, origin } = new URL(LOCAL_DOMAIN);
|
||||
const { origin } = new URL(LOCAL_DOMAIN);
|
||||
const npub = nip19.npubEncode(pubkey);
|
||||
|
||||
return {
|
||||
|
|
@ -38,7 +38,7 @@ function toAccount(event: Event<0>) {
|
|||
header_static: banner,
|
||||
locked: false,
|
||||
note: about,
|
||||
fqn: nip05 || `${npub}@${host}`,
|
||||
fqn: nip05 || npub,
|
||||
url: `${origin}/users/${pubkey}`,
|
||||
username: nip05 ? nip05.split('@')[0] : npub,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue