diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index 8de0eb420e..78dd1d1ff7 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -6,6 +6,7 @@ import watch from '../../../../../services/note/watch'; import { publishNoteStream } from '../../../../../stream'; import notify from '../../../../../notify'; import define from '../../../define'; +import createNote from '../../../../../services/note/create'; export const meta = { desc: { @@ -114,4 +115,13 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { if (user.settings.autoWatch !== false) { watch(user._id, note); } + + // リモート投票の場合リプライ送信 + if (note._user.host != null) { + createNote(user, { + createdAt: new Date(), + text: ps.choice.toString(), + reply: note, + }); + } }));