mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-09 18:39:58 +00:00
fix: prevent showing notification errors for dev for known emoji reaction types (#2704)
This commit is contained in:
parent
9251ec496b
commit
e9ab0cd40b
1 changed files with 9 additions and 1 deletions
|
@ -4,6 +4,13 @@ import type { mastodon } from 'masto'
|
|||
const { notification } = defineProps<{
|
||||
notification: mastodon.v1.Notification
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
// well-known emoji reactions types Elk does not support yet
|
||||
const unsupportedEmojiReactionTypes = ['pleroma:emoji_reaction', 'reaction']
|
||||
if (unsupportedEmojiReactionTypes.includes(notification.type))
|
||||
console.warn(`[DEV] ${t('notification.missing_type')} '${notification.type}' (notification.id: ${notification.id})`)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -88,7 +95,8 @@ const { notification } = defineProps<{
|
|||
<template v-else-if="notification.type === 'mention' || notification.type === 'poll' || notification.type === 'status'">
|
||||
<StatusCard :status="notification.status!" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-else-if="!unsupportedEmojiReactionTypes.includes(notification.type)">
|
||||
<!-- prevent showing errors for dev for known emoji reaction types -->
|
||||
<!-- type 'favourite' and 'reblog' should always rendered by NotificationGroupedLikes -->
|
||||
<div text-red font-bold>
|
||||
[DEV] {{ $t('notification.missing_type') }} '{{ notification.type }}'
|
||||
|
|
Loading…
Reference in a new issue