diff options
| author | dakkar <dakkar@thenautilus.net> | 2025-01-01 16:33:01 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2025-01-01 17:10:56 +0000 |
| commit | f4aa986abdb4a18242737a973b6df9992b66688d (patch) | |
| tree | 20246eddca39158df87afc322ea622e6e6fea2a7 /packages/backend/src/queue | |
| parent | merge: Bump stable version (!842) (diff) | |
| download | sharkey-f4aa986abdb4a18242737a973b6df9992b66688d.tar.gz sharkey-f4aa986abdb4a18242737a973b6df9992b66688d.tar.bz2 sharkey-f4aa986abdb4a18242737a973b6df9992b66688d.zip | |
fix scheduled replies becoming quote-boosts
thanks to @CenTdemeern1 for triggering this bug!
see https://kitsunes.club/notes/a2h1y2rq9n
also compare with https://s.thenautilus.net/notes/a2h1y2rqx9
my instance errored out with:
> WARN 1 [remote ap] Failed to resolve quote
> https://mastodon.social/users/DrALJONES/statuses/110586222749407429
> for note https://kitsunes.club/notes/a2h1y2rq9n: StatusError: 404 Not
> Found
What happened?
* Charlotte scheduled a reply
* the processor called `findOneBy` with an undefined `note.renote`,
which probably caused a `select` without any `where`
* a random note was attached as a quote
* that note has been deleted on the original instance but not on
kitsuclub's database
* the rest of fedi didn't notice the quote
Diffstat (limited to 'packages/backend/src/queue')
| -rw-r--r-- | packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts b/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts index 62e3d1072f..d823d98ef1 100644 --- a/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts +++ b/packages/backend/src/queue/processors/ScheduleNotePostProcessorService.ts @@ -43,7 +43,7 @@ export class ScheduleNotePostProcessorService { @bindThis private async isValidNoteSchedule(note: MiScheduleNoteType, id: string): Promise<boolean> { const reply = note.reply ? await this.notesRepository.findOneBy({ id: note.reply }) : undefined; - const renote = note.reply ? await this.notesRepository.findOneBy({ id: note.renote }) : undefined; + const renote = note.renote ? await this.notesRepository.findOneBy({ id: note.renote }) : undefined; const channel = note.channel ? await this.channelsRepository.findOneBy({ id: note.channel, isArchived: false }) : undefined; if (note.reply && !reply) { this.logger.warn('Schedule Note Failed Reason: parent note to reply does not exist'); @@ -78,7 +78,7 @@ export class ScheduleNotePostProcessorService { const me = await this.usersRepository.findOneBy({ id: data.userId }); const note = data.note; const reply = note.reply ? await this.notesRepository.findOneBy({ id: note.reply }) : undefined; - const renote = note.reply ? await this.notesRepository.findOneBy({ id: note.renote }) : undefined; + const renote = note.renote ? await this.notesRepository.findOneBy({ id: note.renote }) : undefined; const channel = note.channel ? await this.channelsRepository.findOneBy({ id: note.channel, isArchived: false }) : undefined; let files: MiDriveFile[] = []; |