diff --git a/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts b/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts index f281b0ed7b..ea43448ed0 100644 --- a/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts +++ b/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts @@ -10,6 +10,7 @@ import { NoteCreateService } from '@/core/NoteCreateService.js'; import type { ChannelsRepository, DriveFilesRepository, MiDriveFile, NoteScheduleRepository, NotesRepository, UsersRepository } from '@/models/_.js'; import { DI } from '@/di-symbols.js'; import { NotificationService } from '@/core/NotificationService.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; import { QueueLoggerService } from '../QueueLoggerService.js'; import type * as Bull from 'bullmq'; import type { ScheduleNotePostJobData } from '../types.js'; @@ -119,6 +120,12 @@ export class ScheduleNotePostProcessorService { reply, renote, channel, + }).catch(async (err: IdentifiableError) => { + this.notificationService.createNotification(me.id, 'scheduledNoteFailed', { + reason: err.message, + }); + await this.noteScheduleRepository.remove(data); + throw this.logger.error(`Schedule Note Failed Reason: ${err.message}`); }); await this.noteScheduleRepository.remove(data); this.notificationService.createNotification(me.id, 'scheduledNotePosted', { diff --git a/packages/backend/src/server/api/endpoints/notes/schedule/create.ts b/packages/backend/src/server/api/endpoints/notes/schedule/create.ts index b8ae3f44a3..7d20b6b82a 100644 --- a/packages/backend/src/server/api/endpoints/notes/schedule/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/schedule/create.ts @@ -360,7 +360,7 @@ export default class extends Endpoint { // eslint- }, { delay, removeOnComplete: true, - jobId: noteId, + jobId: `schedNote:${noteId}`, }); } diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index bbde7c65f9..c7d5611847 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -821,7 +821,7 @@ async function post(ev?: MouseEvent) { const filesData = toRaw(files.value); const isMissingAltText = filesData.filter( - file => file.type.startsWith('image/') || file.type.startsWith('video/') || file.type.startsWith('audio/') + file => file.type.startsWith('image/') || file.type.startsWith('video/') || file.type.startsWith('audio/'), ).some(file => !file.comment); if (isMissingAltText) { @@ -914,8 +914,6 @@ async function post(ev?: MouseEvent) { claimAchievement('notes1'); } - poll.value = null; - const text = postData.text ?? ''; const lowerCase = text.toLowerCase(); if ((lowerCase.includes('love') || lowerCase.includes('❤')) && lowerCase.includes('sharkey')) {