[Glitch] Add quoted_update notification type

Port f3a932d8a1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire committed 2025-08-26 19:20:18 +02:00
1 parent 7e25f6b606
commit 0710138578
6 files changed
+88 -3

No files matched your search

@@ -39,6 +39,8 @@ export type NotificationGroupMention = BaseNotificationWithStatus<'mention'>;
export type NotificationGroupQuote = BaseNotificationWithStatus<'quote'>;
export type NotificationGroupPoll = BaseNotificationWithStatus<'poll'>;
export type NotificationGroupUpdate = BaseNotificationWithStatus<'update'>;
export type NotificationGroupQuotedUpdate =
BaseNotificationWithStatus<'quoted_update'>;
export type NotificationGroupFollow = BaseNotification<'follow'>;
export type NotificationGroupFollowRequest = BaseNotification<'follow_request'>;
export type NotificationGroupAdminSignUp = BaseNotification<'admin.sign_up'>;
@@ -91,6 +93,7 @@ export type NotificationGroup =
| NotificationGroupQuote
| NotificationGroupPoll
| NotificationGroupUpdate
| NotificationGroupQuotedUpdate
| NotificationGroupFollow
| NotificationGroupFollowRequest
| NotificationGroupModerationWarning
@@ -141,7 +144,8 @@ export function createNotificationGroupFromJSON(
case 'mention':
case 'quote':
case 'poll':
case 'update': {
case 'update':
case 'quoted_update': {
const { status_id: statusId, ...groupWithoutStatus } = group;
return {
statusId: statusId ?? undefined,
@@ -215,6 +219,7 @@ export function createNotificationGroupFromNotificationJSON(
case 'quote':
case 'poll':
case 'update':
case 'quoted_update':
return {
...group,
type: notification.type,