diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-03-16 14:24:11 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-03-16 14:24:11 +0900 |
| commit | 89e2c302dd0f41abb3f49700d63fb1f8cdf7e84a (patch) | |
| tree | 7ab94563de1f978f840f846f6df1d9c22c08bfd5 /packages/backend/src/queue/processors | |
| parent | update tabler-icons (diff) | |
| download | sharkey-89e2c302dd0f41abb3f49700d63fb1f8cdf7e84a.tar.gz sharkey-89e2c302dd0f41abb3f49700d63fb1f8cdf7e84a.tar.bz2 sharkey-89e2c302dd0f41abb3f49700d63fb1f8cdf7e84a.zip | |
refactor(backend): integrate CreateNotificationService to NotificationService
Diffstat (limited to 'packages/backend/src/queue/processors')
| -rw-r--r-- | packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts b/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts index 037dfa1a53..501ed4090a 100644 --- a/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts +++ b/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts @@ -3,11 +3,11 @@ import { DI } from '@/di-symbols.js'; import type { PollVotesRepository, NotesRepository } from '@/models/index.js'; import type { Config } from '@/config.js'; import type Logger from '@/logger.js'; -import { CreateNotificationService } from '@/core/CreateNotificationService.js'; +import { NotificationService } from '@/core/NotificationService.js'; +import { bindThis } from '@/decorators.js'; import { QueueLoggerService } from '../QueueLoggerService.js'; import type Bull from 'bull'; import type { EndedPollNotificationJobData } from '../types.js'; -import { bindThis } from '@/decorators.js'; @Injectable() export class EndedPollNotificationProcessorService { @@ -23,7 +23,7 @@ export class EndedPollNotificationProcessorService { @Inject(DI.pollVotesRepository) private pollVotesRepository: PollVotesRepository, - private createNotificationService: CreateNotificationService, + private notificationService: NotificationService, private queueLoggerService: QueueLoggerService, ) { this.logger = this.queueLoggerService.logger.createSubLogger('ended-poll-notification'); @@ -47,7 +47,7 @@ export class EndedPollNotificationProcessorService { const userIds = [...new Set([note.userId, ...votes.map(v => v.userId)])]; for (const userId of userIds) { - this.createNotificationService.createNotification(userId, 'pollEnded', { + this.notificationService.createNotification(userId, 'pollEnded', { noteId: note.id, }); } |