1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-28 06:48:14 +09:00

fix: notification with null status should be excluded

Fixes #1995
This commit is contained in:
patak 2023-04-21 21:35:39 +02:00
parent 6f19d54586
commit ce149e4cb4

View File

@ -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) {