diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 0292f7bbb9..936f26a0b5 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -266,7 +266,6 @@ export class ReactionService { reaction: reaction, }, user.id); - this.webhookService.getActiveWebhooks().then(async webhooks => { webhooks = webhooks.filter(x => x.userId === note.userId && x.on.includes('reaction')); if (webhooks.length === 0) return; @@ -286,7 +285,7 @@ export class ReactionService { for (const webhook of webhooks) { this.queueService.userWebhookDeliver(webhook, 'reaction', payload); } - }) + }); } //#region 配信 diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 061b533b72..8ac48678ed 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -1810,6 +1810,10 @@ declare namespace entities { MeDetailed, UserDetailed, User, + UserWebhookBody, + UserWebhookNoteBody, + UserWebhookUserBody, + UserWebhookReactionBody, UserList, Ad, Announcement, @@ -3402,6 +3406,18 @@ type UsersShowResponse = operations['users___show']['responses']['200']['content // @public (undocumented) 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: // // src/entities.ts:50:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index 04574849d4..8b1711015c 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -7,6 +7,10 @@ export type UserDetailedNotMe = components['schemas']['UserDetailedNotMe']; export type MeDetailed = components['schemas']['MeDetailed']; export type UserDetailed = components['schemas']['UserDetailed']; 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 Ad = components['schemas']['Ad']; export type Announcement = components['schemas']['Announcement']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index a5333d4f93..3554593110 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4013,6 +4013,32 @@ export type components = { MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly']; UserDetailed: components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed']; 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: { /** * Format: id