From c3438eb4a7187773e2736dea765bb8281f7edf0e Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 28 Jun 2020 18:33:58 +0300 Subject: refactor: move convertPoll to polls hooks --- services/feed/feed.hooks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/feed/feed.hooks.ts') diff --git a/services/feed/feed.hooks.ts b/services/feed/feed.hooks.ts index 54f6d61..6bff8dc 100644 --- a/services/feed/feed.hooks.ts +++ b/services/feed/feed.hooks.ts @@ -7,7 +7,7 @@ const raiseNewVerifedPolls = async (context: HookContext): Promise // Raise unseen verified polls to the very top context.result = _.sortBy( context.result, - poll => !(poll.author.verified && !poll.userChoice) + poll => !(poll.author.verified && !poll.vote) ); return context; }; @@ -16,7 +16,7 @@ const lowerOldPolls = async (context: HookContext): Promise => { // Move all seen polls down context.result = _.sortBy( context.result, - poll => !!poll.userChoice + poll => !!poll.vote ); return context; }; -- cgit v1.2.3