From 411cb8351cf99ab7257a5db81ee2a7905cf79aef Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Mon, 28 Oct 2024 20:11:04 -0500 Subject: [PATCH] consistency --- packages/backend/src/core/WebhookTestService.ts | 4 ++-- packages/backend/src/models/json-schema/user-webhook.ts | 2 +- packages/backend/test/unit/WebhookTestService.ts | 4 ++-- packages/misskey-js/src/autogen/types.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/core/WebhookTestService.ts b/packages/backend/src/core/WebhookTestService.ts index 5aaea06423..c4210fbcf5 100644 --- a/packages/backend/src/core/WebhookTestService.ts +++ b/packages/backend/src/core/WebhookTestService.ts @@ -399,7 +399,7 @@ export class WebhookTestService { break; } case 'follow': { - send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser2))); + send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser1))); break; } case 'followed': { @@ -407,7 +407,7 @@ export class WebhookTestService { break; } case 'unfollow': { - send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser2))); + send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser3))); break; } case 'reaction': { diff --git a/packages/backend/src/models/json-schema/user-webhook.ts b/packages/backend/src/models/json-schema/user-webhook.ts index 9871181225..aaf8a6afc8 100644 --- a/packages/backend/src/models/json-schema/user-webhook.ts +++ b/packages/backend/src/models/json-schema/user-webhook.ts @@ -22,7 +22,7 @@ export const packedUserWebhookUserBodySchema = { properties: { user: { type: 'object', - ref: 'UserDetailedNotMe', + ref: 'UserLite', optional: false, nullable: false, }, diff --git a/packages/backend/test/unit/WebhookTestService.ts b/packages/backend/test/unit/WebhookTestService.ts index caffe67ec7..29867af409 100644 --- a/packages/backend/test/unit/WebhookTestService.ts +++ b/packages/backend/test/unit/WebhookTestService.ts @@ -159,7 +159,7 @@ describe('WebhookTestService', () => { const calls = queueService.userWebhookDeliver.mock.calls[0]; expect((calls[0] as any).id).toBe('dummy-webhook'); expect(calls[1]).toBe('follow'); - expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-2'); + expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-1'); }); test('followed', async () => { @@ -177,7 +177,7 @@ describe('WebhookTestService', () => { const calls = queueService.userWebhookDeliver.mock.calls[0]; expect((calls[0] as any).id).toBe('dummy-webhook'); expect(calls[1]).toBe('unfollow'); - expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-2'); + expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-3'); }); test('reaction', async () => { diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 3554593110..5f9b4316f3 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4016,7 +4016,7 @@ export type components = { UserWebhookBody: OneOf<[{ note: components['schemas']['Note']; }, { - user: components['schemas']['UserDetailedNotMe']; + user: components['schemas']['UserLite']; }, { note: components['schemas']['Note']; reaction: { @@ -4029,7 +4029,7 @@ export type components = { note: components['schemas']['Note']; }; UserWebhookUserBody: { - user: components['schemas']['UserDetailedNotMe']; + user: components['schemas']['UserLite']; }; UserWebhookReactionBody: { note: components['schemas']['Note'];