consistency

This commit is contained in:
ゆめ 2024-10-28 20:11:04 -05:00
parent 93a45a5779
commit 411cb8351c
No known key found for this signature in database
4 changed files with 7 additions and 7 deletions

View file

@ -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': {

View file

@ -22,7 +22,7 @@ export const packedUserWebhookUserBodySchema = {
properties: {
user: {
type: 'object',
ref: 'UserDetailedNotMe',
ref: 'UserLite',
optional: false,
nullable: false,
},

View file

@ -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 () => {

View file

@ -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'];