リモート投票の場合リプライ送信
This commit is contained in:
parent
b7a6699c35
commit
2d31c67006
|
@ -6,6 +6,7 @@ import watch from '../../../../../services/note/watch';
|
||||||
import { publishNoteStream } from '../../../../../stream';
|
import { publishNoteStream } from '../../../../../stream';
|
||||||
import notify from '../../../../../notify';
|
import notify from '../../../../../notify';
|
||||||
import define from '../../../define';
|
import define from '../../../define';
|
||||||
|
import createNote from '../../../../../services/note/create';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
desc: {
|
desc: {
|
||||||
|
@ -114,4 +115,13 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
||||||
if (user.settings.autoWatch !== false) {
|
if (user.settings.autoWatch !== false) {
|
||||||
watch(user._id, note);
|
watch(user._id, note);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// リモート投票の場合リプライ送信
|
||||||
|
if (note._user.host != null) {
|
||||||
|
createNote(user, {
|
||||||
|
createdAt: new Date(),
|
||||||
|
text: ps.choice.toString(),
|
||||||
|
reply: note,
|
||||||
|
});
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue