mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 20:29:08 +01:00
fix: getShortHandle
This commit is contained in:
parent
f3ebdf3123
commit
bced99e14b
1 changed files with 3 additions and 2 deletions
|
@ -47,8 +47,9 @@ export function getDisplayName(account?: Account, options?: { rich?: boolean })
|
||||||
return displayName.replace(/:([\w-]+?):/g, '')
|
return displayName.replace(/:([\w-]+?):/g, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getShortHandle(account: Account) {
|
export function getShortHandle({ acct }: Account) {
|
||||||
return `@${account.acct}`
|
|
||||||
|
return `@${acct.includes('@') ? acct.split('@')[0] : acct}`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getFullHandle(account: Account) {
|
export function getFullHandle(account: Account) {
|
||||||
|
|
Loading…
Reference in a new issue