diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index 78dd1d1ff7..f99fb099c7 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -7,6 +7,7 @@ import { publishNoteStream } from '../../../../../stream'; import notify from '../../../../../notify'; import define from '../../../define'; import createNote from '../../../../../services/note/create'; +import User from '../../../../../models/user'; export const meta = { desc: { @@ -118,10 +119,16 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { // リモート投票の場合リプライ送信 if (note._user.host != null) { + const pollOwner = await User.findOne({ + _id: note.userId + }); + createNote(user, { createdAt: new Date(), text: ps.choice.toString(), reply: note, + visibility: 'specified', + visibleUsers: [ pollOwner ], }); } }));