Skip to content

Commit b81ca28

Browse files
committed
fix: replying to self
1 parent 7c594c6 commit b81ca28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/status/StatusReplyingTo.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const { status } = defineProps<{
55
status: Status
66
}>()
77
8-
const account = useAccountById(status.inReplyToAccountId)
8+
const isSelf = $computed(() => status.inReplyToAccountId === status.account.id)
9+
const account = isSelf ? computed(() => status.account) : useAccountById(status.inReplyToAccountId)
910
</script>
1011

1112
<template>
@@ -17,7 +18,7 @@ const account = useAccountById(status.inReplyToAccountId)
1718
:title="account ? `Replying to ${getDisplayName(account)}` : 'Replying to someone'"
1819
>
1920
<div i-ri:reply-fill class="scale-x-[-1]" text-secondary-light />
20-
<template v-if="account?.id !== status.account.id">
21+
<template v-if="!isSelf">
2122
<AccountInlineInfo v-if="account" :account="account" :link="false" />
2223
<span v-else ws-nowrap>{{ $t('status.someone') }}</span>
2324
</template>

0 commit comments

Comments
 (0)