Merge remote-tracking branch 'parent/main' into upstream-20240817
This commit is contained in:
commit
82ffc95733
97 changed files with 1377 additions and 472 deletions
|
@ -23,7 +23,7 @@ interface BaseNotificationGroup
|
|||
interface BaseNotificationWithStatus<Type extends NotificationWithStatusType>
|
||||
extends BaseNotificationGroup {
|
||||
type: Type;
|
||||
statusId: string;
|
||||
statusId: string | undefined;
|
||||
emojiReactionGroups?: EmojiReactionGroup[];
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ export function createNotificationGroupFromJSON(
|
|||
case 'update': {
|
||||
const { status_id: statusId, ...groupWithoutStatus } = group;
|
||||
return {
|
||||
statusId,
|
||||
statusId: statusId ?? undefined,
|
||||
sampleAccountIds,
|
||||
...groupWithoutStatus,
|
||||
};
|
||||
|
@ -189,7 +189,7 @@ export function createNotificationGroupFromJSON(
|
|||
} as EmojiReactionGroup;
|
||||
});
|
||||
return {
|
||||
statusId,
|
||||
statusId: statusId ?? undefined,
|
||||
sampleAccountIds,
|
||||
emojiReactionGroups: groups,
|
||||
...groupWithoutStatus,
|
||||
|
@ -248,11 +248,11 @@ export function createNotificationGroupFromNotificationJSON(
|
|||
case 'status_reference':
|
||||
case 'poll':
|
||||
case 'update':
|
||||
return { ...group, statusId: notification.status.id };
|
||||
return { ...group, statusId: notification.status?.id };
|
||||
case 'emoji_reaction':
|
||||
return {
|
||||
...group,
|
||||
statusId: notification.status.id,
|
||||
statusId: notification.status?.id,
|
||||
emojiReactionGroups: createEmojiReactionGroupsFromJSON(
|
||||
notification.emoji_reaction,
|
||||
group.sampleAccountIds,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue