fixup! fix(backend): Webhook Test一致性+リアクションhook実装

lint + update misskey-js definitions
This commit is contained in:
ゆめ 2024-10-28 19:52:08 -05:00
parent 4bc97c75c7
commit 93a45a5779
No known key found for this signature in database
4 changed files with 47 additions and 2 deletions

View file

@ -266,7 +266,6 @@ export class ReactionService {
reaction: reaction, reaction: reaction,
}, user.id); }, user.id);
this.webhookService.getActiveWebhooks().then(async webhooks => { this.webhookService.getActiveWebhooks().then(async webhooks => {
webhooks = webhooks.filter(x => x.userId === note.userId && x.on.includes('reaction')); webhooks = webhooks.filter(x => x.userId === note.userId && x.on.includes('reaction'));
if (webhooks.length === 0) return; if (webhooks.length === 0) return;
@ -286,7 +285,7 @@ export class ReactionService {
for (const webhook of webhooks) { for (const webhook of webhooks) {
this.queueService.userWebhookDeliver(webhook, 'reaction', payload); this.queueService.userWebhookDeliver(webhook, 'reaction', payload);
} }
}) });
} }
//#region 配信 //#region 配信

View file

@ -1810,6 +1810,10 @@ declare namespace entities {
MeDetailed, MeDetailed,
UserDetailed, UserDetailed,
User, User,
UserWebhookBody,
UserWebhookNoteBody,
UserWebhookUserBody,
UserWebhookReactionBody,
UserList, UserList,
Ad, Ad,
Announcement, Announcement,
@ -3402,6 +3406,18 @@ type UsersShowResponse = operations['users___show']['responses']['200']['content
// @public (undocumented) // @public (undocumented)
type UsersUpdateMemoRequest = operations['users___update-memo']['requestBody']['content']['application/json']; type UsersUpdateMemoRequest = operations['users___update-memo']['requestBody']['content']['application/json'];
// @public (undocumented)
type UserWebhookBody = components['schemas']['UserWebhookBody'];
// @public (undocumented)
type UserWebhookNoteBody = components['schemas']['UserWebhookNoteBody'];
// @public (undocumented)
type UserWebhookReactionBody = components['schemas']['UserWebhookReactionBody'];
// @public (undocumented)
type UserWebhookUserBody = components['schemas']['UserWebhookUserBody'];
// Warnings were encountered during analysis: // Warnings were encountered during analysis:
// //
// src/entities.ts:50:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts // src/entities.ts:50:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts

View file

@ -7,6 +7,10 @@ export type UserDetailedNotMe = components['schemas']['UserDetailedNotMe'];
export type MeDetailed = components['schemas']['MeDetailed']; export type MeDetailed = components['schemas']['MeDetailed'];
export type UserDetailed = components['schemas']['UserDetailed']; export type UserDetailed = components['schemas']['UserDetailed'];
export type User = components['schemas']['User']; export type User = components['schemas']['User'];
export type UserWebhookBody = components['schemas']['UserWebhookBody'];
export type UserWebhookNoteBody = components['schemas']['UserWebhookNoteBody'];
export type UserWebhookUserBody = components['schemas']['UserWebhookUserBody'];
export type UserWebhookReactionBody = components['schemas']['UserWebhookReactionBody'];
export type UserList = components['schemas']['UserList']; export type UserList = components['schemas']['UserList'];
export type Ad = components['schemas']['Ad']; export type Ad = components['schemas']['Ad'];
export type Announcement = components['schemas']['Announcement']; export type Announcement = components['schemas']['Announcement'];

View file

@ -4013,6 +4013,32 @@ export type components = {
MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly']; MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly'];
UserDetailed: components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed']; UserDetailed: components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed'];
User: components['schemas']['UserLite'] | components['schemas']['UserDetailed']; User: components['schemas']['UserLite'] | components['schemas']['UserDetailed'];
UserWebhookBody: OneOf<[{
note: components['schemas']['Note'];
}, {
user: components['schemas']['UserDetailedNotMe'];
}, {
note: components['schemas']['Note'];
reaction: {
id: string;
user: components['schemas']['UserLite'];
reaction: string;
};
}]>;
UserWebhookNoteBody: {
note: components['schemas']['Note'];
};
UserWebhookUserBody: {
user: components['schemas']['UserDetailedNotMe'];
};
UserWebhookReactionBody: {
note: components['schemas']['Note'];
reaction: {
id: string;
user: components['schemas']['UserLite'];
reaction: string;
};
};
UserList: { UserList: {
/** /**
* Format: id * Format: id