diff options
| author | おさむのひと <46447427+samunohito@users.noreply.github.com> | 2025-01-14 20:14:02 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-14 11:14:02 +0000 |
| commit | d2e22f90507a1920c15d0b997009f52067a2a828 (patch) | |
| tree | 3bfb0ef6ab271cb48ac3fc324f0b512da210df47 /packages/backend/src/queue | |
| parent | enhance: 連合モードにあわせてフロントエンドを変化させ... (diff) | |
| download | sharkey-d2e22f90507a1920c15d0b997009f52067a2a828.tar.gz sharkey-d2e22f90507a1920c15d0b997009f52067a2a828.tar.bz2 sharkey-d2e22f90507a1920c15d0b997009f52067a2a828.zip | |
refactor: SystemWebhook/UserWebhookの配信処理呼び出し部分の改善 (#15035)
* UserWebhook側の対処
* SystemWebhook側の対処
* fix test
Diffstat (limited to 'packages/backend/src/queue')
| -rw-r--r-- | packages/backend/src/queue/processors/CheckModeratorsActivityProcessorService.ts | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/packages/backend/src/queue/processors/CheckModeratorsActivityProcessorService.ts b/packages/backend/src/queue/processors/CheckModeratorsActivityProcessorService.ts index 87183cb342..2e84430e72 100644 --- a/packages/backend/src/queue/processors/CheckModeratorsActivityProcessorService.ts +++ b/packages/backend/src/queue/processors/CheckModeratorsActivityProcessorService.ts @@ -231,15 +231,10 @@ export class CheckModeratorsActivityProcessorService { // -- SystemWebhook - const systemWebhooks = await this.systemWebhookService.fetchActiveSystemWebhooks() - .then(it => it.filter(it => it.on.includes('inactiveModeratorsWarning'))); - for (const systemWebhook of systemWebhooks) { - this.systemWebhookService.enqueueSystemWebhook( - systemWebhook, - 'inactiveModeratorsWarning', - { remainingTime: remainingTime }, - ); - } + return this.systemWebhookService.enqueueSystemWebhook( + 'inactiveModeratorsWarning', + { remainingTime: remainingTime }, + ); } @bindThis @@ -269,15 +264,10 @@ export class CheckModeratorsActivityProcessorService { // -- SystemWebhook - const systemWebhooks = await this.systemWebhookService.fetchActiveSystemWebhooks() - .then(it => it.filter(it => it.on.includes('inactiveModeratorsInvitationOnlyChanged'))); - for (const systemWebhook of systemWebhooks) { - this.systemWebhookService.enqueueSystemWebhook( - systemWebhook, - 'inactiveModeratorsInvitationOnlyChanged', - {}, - ); - } + return this.systemWebhookService.enqueueSystemWebhook( + 'inactiveModeratorsInvitationOnlyChanged', + {}, + ); } @bindThis |