Truncate npub username

This commit is contained in:
Alex Gleason 2023-05-11 22:34:56 -05:00
parent ef5bfb79f0
commit 1ba46dd7a3
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ async function toAccount(event: Event<0>, opts: ToAccountOpts = {}) {
note: lodash.escape(about),
fqn: parsed05?.handle || npub,
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 {
id: pubkey,
acct: npub,
username: npub,
username: npub.substring(0, 8),
url: `${origin}/users/${pubkey}`,
};
}