This commit is contained in:
syuilo 2019-04-13 18:14:32 +09:00
parent 491d1c01ad
commit b842b26bf0

View file

@ -154,7 +154,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
// vote
if (reply && reply.hasPoll) {
const poll = await Polls.findOne({ noteId: reply.id }).then(ensure);
const poll = await Polls.findOne(reply.id).then(ensure);
const tryCreateVote = async (name: string, index: number): Promise<null> => {
if (poll.expiresAt && Date.now() > new Date(poll.expiresAt).getTime()) {