From a50c8e951f03a8eb53957ad1c3703155b223ed24 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 31 Jul 2024 15:23:08 +0200 Subject: [PATCH] Fix issue with grouped notifications UI due to recent API change (#31224) --- app/javascript/mastodon/api_types/notifications.ts | 2 +- app/javascript/mastodon/models/notification_group.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/api_types/notifications.ts b/app/javascript/mastodon/api_types/notifications.ts index fba0b7941b..ed73ceda6b 100644 --- a/app/javascript/mastodon/api_types/notifications.ts +++ b/app/javascript/mastodon/api_types/notifications.ts @@ -60,7 +60,7 @@ export interface BaseNotificationGroupJSON { interface NotificationGroupWithStatusJSON extends BaseNotificationGroupJSON { type: NotificationWithStatusType; - status: ApiStatusJSON; + status_id: string; } interface NotificationWithStatusJSON extends BaseNotificationJSON { diff --git a/app/javascript/mastodon/models/notification_group.ts b/app/javascript/mastodon/models/notification_group.ts index 330bba88a8..76034e644e 100644 --- a/app/javascript/mastodon/models/notification_group.ts +++ b/app/javascript/mastodon/models/notification_group.ts @@ -124,9 +124,9 @@ export function createNotificationGroupFromJSON( case 'mention': case 'poll': case 'update': { - const { status, ...groupWithoutStatus } = group; + const { status_id: statusId, ...groupWithoutStatus } = group; return { - statusId: status.id, + statusId, sampleAccountIds, ...groupWithoutStatus, };