Add quoted_update notification type (#35820)
This commit is contained in:
1 parent
7aba79ade9
commit
f3a932d8a1
12 files changed
+117
-6
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,
|
||||
|
||||
Reference in new issue
Block a user