fix: remove emoji in status title (#932)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
parent
c2850a34ae
commit
c1e89582f8
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
import type { mastodon } from 'masto'
|
||||
|
||||
export function getDisplayName(account?: mastodon.v1.Account, options?: { rich?: boolean }) {
|
||||
const displayName = account?.displayName || account?.username || ''
|
||||
export function getDisplayName(account: mastodon.v1.Account, options?: { rich?: boolean }) {
|
||||
const displayName = account.displayName || account.username || account.acct || ''
|
||||
if (options?.rich)
|
||||
return displayName
|
||||
return displayName.replace(/:([\w-]+?):/g, '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue