upd: add notification for when scheduled note gets posted

This commit is contained in:
Marie 2024-11-04 11:22:37 +01:00
parent 170093f2a2
commit 1d3c825398
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
13 changed files with 77 additions and 9 deletions

View file

@ -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,
});
}
});
}