From 50fab971e01cca4ed8d6aed1f3292dbea8badb57 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 10 Feb 2022 19:42:08 -0500 Subject: [PATCH] Temp vip fix --- src/routes/voteOnSponsorTime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index e0bdb58..5a9c47b 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -63,7 +63,7 @@ const isUserTempVIP = async (nonAnonUserID: HashedUserID, videoID: VideoID): Pro const apiVideoInfo = await getYouTubeVideoInfo(videoID); const channelID = apiVideoInfo?.data?.authorId; const { err, reply } = await redis.getAsync(tempVIPKey(nonAnonUserID)); - return err ? false : (reply == channelID); + return err || !reply ? false : (reply == channelID); }; const videoDurationChanged = (segmentDuration: number, APIDuration: number) => (APIDuration > 0 && Math.abs(segmentDuration - APIDuration) > 2);