From e9ab0cd40b0d21c4cb8f9a26085aaa3e7d4926c4 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Wed, 20 Mar 2024 00:04:16 +0900 Subject: [PATCH] fix: prevent showing notification errors for dev for known emoji reaction types (#2704) --- components/notification/NotificationCard.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/notification/NotificationCard.vue b/components/notification/NotificationCard.vue index 69b0438f07..a3d0eca8fb 100644 --- a/components/notification/NotificationCard.vue +++ b/components/notification/NotificationCard.vue @@ -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})`)