From c26800ca2e95b7dc11b31d197c95f4d28e332268 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Fri, 17 Nov 2023 12:00:04 +0000 Subject: [PATCH] reddit: fix expiry check --- src/modules/processing/services/reddit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/processing/services/reddit.js b/src/modules/processing/services/reddit.js index c985831a..43f01817 100644 --- a/src/modules/processing/services/reddit.js +++ b/src/modules/processing/services/reddit.js @@ -18,7 +18,7 @@ async function getAccessToken() { const values = cookie.values(), needRefresh = !values.access_token || !values.expiry - || Number(values.expiry) > new Date().getTime(); + || Number(values.expiry) < new Date().getTime(); if (!needRefresh) return values.access_token; const data = await fetch('https://www.reddit.com/api/v1/access_token', {