From 42f747cdf232718a6ebaccb9ab10ee3e1d33e10f Mon Sep 17 00:00:00 2001 From: Niten Date: Mon, 3 May 2021 10:53:39 -0700 Subject: [PATCH] Check value of md4rd variables before login --- site.d/reddit.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/site.d/reddit.el b/site.d/reddit.el index f2f82ad..b02891b 100644 --- a/site.d/reddit.el +++ b/site.d/reddit.el @@ -43,7 +43,10 @@ (defun consider-refresh-md4rd-login () (when (and (boundp 'md4rd--oauth-client-id) (boundp 'md4rd--oauth-access-token) - (boundp 'md4rd--oauth-refresh-token)) + (boundp 'md4rd--oauth-refresh-token) + (not (string= "" md4rd--oauth-client-id)) + (not (string= "" md4rd--oauth-access-token)) + (not (string= "" md4rd--oauth-refresh-token))) (md4rd-refresh-login))) (run-with-timer 0 3540 'consider-refresh-md4rd-login)