diff options
| author | 饺子w (Yumechi) <35571479+eternal-flame-AD@users.noreply.github.com> | 2024-11-11 18:51:18 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-12 09:51:18 +0900 |
| commit | a11b77a4158e07c18bcc57f77660cb08c0d950ea (patch) | |
| tree | 33ce9802a102d3707c4c1dafca2bd5f7c4439f19 /packages/backend/src/core/QueueService.ts | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | sharkey-a11b77a4158e07c18bcc57f77660cb08c0d950ea.tar.gz sharkey-a11b77a4158e07c18bcc57f77660cb08c0d950ea.tar.bz2 sharkey-a11b77a4158e07c18bcc57f77660cb08c0d950ea.zip | |
fix(backend): Webhook Test一致性 (#14863)
* fix(backend): Webhook Test一致性
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
* UserWebhookPayload<'followed'> 修正
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
---------
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
Diffstat (limited to 'packages/backend/src/core/QueueService.ts')
| -rw-r--r-- | packages/backend/src/core/QueueService.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/backend/src/core/QueueService.ts b/packages/backend/src/core/QueueService.ts index 37028026cc..50f08da241 100644 --- a/packages/backend/src/core/QueueService.ts +++ b/packages/backend/src/core/QueueService.ts @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto'; import { Inject, Injectable } from '@nestjs/common'; import type { IActivity } from '@/core/activitypub/type.js'; import type { MiDriveFile } from '@/models/DriveFile.js'; -import type { MiWebhook, webhookEventTypes } from '@/models/Webhook.js'; +import type { MiWebhook, WebhookEventTypes, webhookEventTypes } from '@/models/Webhook.js'; import type { MiSystemWebhook, SystemWebhookEventType } from '@/models/SystemWebhook.js'; import type { Config } from '@/config.js'; import { DI } from '@/di-symbols.js'; @@ -35,6 +35,7 @@ import type { } from './QueueModule.js'; import type httpSignature from '@peertube/http-signature'; import type * as Bull from 'bullmq'; +import { type UserWebhookPayload } from './UserWebhookService.js'; @Injectable() export class QueueService { @@ -468,10 +469,10 @@ export class QueueService { * @see UserWebhookDeliverProcessorService */ @bindThis - public userWebhookDeliver( + public userWebhookDeliver<T extends WebhookEventTypes>( webhook: MiWebhook, - type: typeof webhookEventTypes[number], - content: unknown, + type: T, + content: UserWebhookPayload<T>, opts?: { attempts?: number }, ) { const data: UserWebhookDeliverJobData = { |