From ce149e4cb4d3429d8624b399ddcc27f37108ee29 Mon Sep 17 00:00:00 2001 From: patak Date: Fri, 21 Apr 2023 21:35:39 +0200 Subject: [PATCH] fix: notification with null status should be excluded Fixes #1995 --- components/notification/NotificationPaginator.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/notification/NotificationPaginator.vue b/components/notification/NotificationPaginator.vue index 2385e043..65fc142f 100644 --- a/components/notification/NotificationPaginator.vue +++ b/components/notification/NotificationPaginator.vue @@ -75,7 +75,12 @@ function groupItems(items: mastodon.v1.Notification[]): NotificationSlot[] { } return } - else if (group.length && group[0].status && (group[0].type === 'reblog' || group[0].type === 'favourite')) { + else if (group.length && (group[0].type === 'reblog' || group[0].type === 'favourite')) { + if (!group[0].status) { + // Ignore favourite or reblog if status is null, sometimes the API is sending these + // notifications + return + } // All notifications in these group are reblogs or favourites of the same status const likes: GroupedAccountLike[] = [] for (const notification of group) {