diff --git a/packages/backend/src/queue/processors/ended-poll-notification.ts b/packages/backend/src/queue/processors/ended-poll-notification.ts index 3bf010a1b..c652d6216 100644 --- a/packages/backend/src/queue/processors/ended-poll-notification.ts +++ b/packages/backend/src/queue/processors/ended-poll-notification.ts @@ -28,6 +28,7 @@ export async function endedPollNotification( for (const userId of userIds) { createNotification(userId, "pollEnded", { + note: note, noteId: note.id, }); } diff --git a/packages/backend/src/services/create-notification.ts b/packages/backend/src/services/create-notification.ts index d89cb8549..04cdac397 100644 --- a/packages/backend/src/services/create-notification.ts +++ b/packages/backend/src/services/create-notification.ts @@ -25,7 +25,7 @@ export async function createNotification( if ( data.notifierId && - ["mention", "reply", "renote", "quote", "reaction", "bite"].includes(type) + ["mention", "reply", "renote", "quote", "reaction", "bite", "pollVote"].includes(type) ) { const notifier = await Users.findOneBy({ id: data.notifierId }); // suppress if the notifier does not exist or is silenced. diff --git a/packages/backend/src/services/note/polls/vote.ts b/packages/backend/src/services/note/polls/vote.ts index 582af0b17..1016e6aa9 100644 --- a/packages/backend/src/services/note/polls/vote.ts +++ b/packages/backend/src/services/note/polls/vote.ts @@ -67,6 +67,7 @@ export default async function ( // Notify createNotification(note.userId, "pollVote", { notifierId: user.id, + note: note, noteId: note.id, choice: choice, }); @@ -79,6 +80,7 @@ export default async function ( for (const watcher of watchers) { createNotification(watcher.userId, "pollVote", { notifierId: user.id, + note: note, noteId: note.id, choice: choice, });