mirror of
https://github.com/elk-zone/elk
synced 2024-11-27 06:18:07 +09:00
fix: remove emoji in status title (#932)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
parent
c2850a34ae
commit
c1e89582f8
@ -20,7 +20,7 @@ const createdAt = useFormattedDateTime(status.createdAt)
|
||||
const { t } = useI18n()
|
||||
|
||||
useHeadFixed({
|
||||
title: () => `${status.account.displayName || status.account.acct} ${t('common.in')} ${t('app_name')}: "${removeHTMLTags(status.content) || ''}"`,
|
||||
title: () => `${getDisplayName(status.account)} ${t('common.in')} ${t('app_name')}: "${removeHTMLTags(status.content) || ''}"`,
|
||||
})
|
||||
|
||||
const isDM = $computed(() => status.visibility === 'direct')
|
||||
|
@ -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…
Reference in New Issue
Block a user