1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-31 23:31:48 +09:00
This commit is contained in:
syuilo 2019-04-13 18:14:32 +09:00
parent 2927fb1597
commit d46eca4c87
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -154,7 +154,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
// vote // vote
if (reply && reply.hasPoll) { 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> => { const tryCreateVote = async (name: string, index: number): Promise<null> => {
if (poll.expiresAt && Date.now() > new Date(poll.expiresAt).getTime()) { if (poll.expiresAt && Date.now() > new Date(poll.expiresAt).getTime()) {