diff options
| author | Marie <github@yuugi.dev> | 2024-11-04 11:22:37 +0100 |
|---|---|---|
| committer | Marie <github@yuugi.dev> | 2024-12-09 05:33:19 +0100 |
| commit | 1d3c8253981fba2d431df2f5cc12dd78b21d37bc (patch) | |
| tree | 263d59f8f07b27d4d6192c2273eca3195e5e8bc1 /packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts | |
| parent | chore: remove from note required type (diff) | |
| download | sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.tar.gz sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.tar.bz2 sharkey-1d3c8253981fba2d431df2f5cc12dd78b21d37bc.zip | |
upd: add notification for when scheduled note gets posted
Diffstat (limited to 'packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts')
| -rw-r--r-- | packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts b/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts index 59e23b865e..f281b0ed7b 100644 --- a/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts +++ b/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts @@ -107,7 +107,7 @@ export class ScheduleNotePostProcessorService { return; } - await this.noteCreateService.create(me, { + const createdNote = await this.noteCreateService.create(me, { ...note, createdAt: new Date(), files, @@ -121,6 +121,9 @@ export class ScheduleNotePostProcessorService { channel, }); await this.noteScheduleRepository.remove(data); + this.notificationService.createNotification(me.id, 'scheduledNotePosted', { + noteId: createdNote.id, + }); } }); } |