fix: getShortHandle

zio/stable
patak 2022-11-26 17:37:15 +01:00
parent f3ebdf3123
commit bced99e14b
1 changed files with 3 additions and 2 deletions

View File

@ -47,8 +47,9 @@ export function getDisplayName(account?: Account, options?: { rich?: boolean })
return displayName.replace(/:([\w-]+?):/g, '')
}
export function getShortHandle(account: Account) {
return `@${account.acct}`
export function getShortHandle({ acct }: Account) {
return `@${acct.includes('@') ? acct.split('@')[0] : acct}`
}
export function getFullHandle(account: Account) {