From d46eca4c87d20e3f5c441162b837472a27682690 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Sat, 13 Apr 2019 18:14:32 +0900
Subject: [PATCH] Refactor

---
 src/remote/activitypub/models/note.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts
index 78f5005953..60d4cf37d7 100644
--- a/src/remote/activitypub/models/note.ts
+++ b/src/remote/activitypub/models/note.ts
@@ -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()) {