From 6ce067af56d0848156ed83f541a7029a993b572a Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 29 Aug 2024 22:39:10 +0200 Subject: [PATCH] server: re-fetch poll votes before end notif --- .../backend/src/queue/processors/ended-poll-notification.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/backend/src/queue/processors/ended-poll-notification.ts b/packages/backend/src/queue/processors/ended-poll-notification.ts index bdbbdc72e..a1ac41839 100644 --- a/packages/backend/src/queue/processors/ended-poll-notification.ts +++ b/packages/backend/src/queue/processors/ended-poll-notification.ts @@ -2,6 +2,8 @@ import Bull from 'bull'; import { Notes, PollVotes } from '@/models/index.js'; import { EndedPollNotificationJobData } from '@/queue/types.js'; import { createNotification } from '@/services/create-notification.js'; +import { Resolver } from '@/remote/activitypub/resolver.js'; +import { updateQuestion } from '@/remote/activitypub/models/question.js'; export async function endedPollNotification(job: Bull.Job, done: any): Promise { const note = await Notes.findOneBy({ id: job.data.noteId }); @@ -10,6 +12,9 @@ export async function endedPollNotification(job: Bull.Job