emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon f368ce2919 13/76: refactor stray plstore token ch


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon f368ce2919 13/76: refactor stray plstore token check.
Date: Sun, 30 Mar 2025 13:01:45 -0400 (EDT)

branch: elpa/mastodon
commit f368ce2919bd2126f7a659ef57fd21c0d10ca951
Author: marty hiatt <martianhiatus@disroot.org>
Commit: marty hiatt <martianhiatus@disroot.org>

    refactor stray plstore token check.
    
    re-fix auth-source plstore check
---
 lisp/mastodon-auth.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el
index 4a8021fae8..e77a86febd 100644
--- a/lisp/mastodon-auth.el
+++ b/lisp/mastodon-auth.el
@@ -216,11 +216,10 @@ Generate/save token if none known yet."
    ;; if auth source enabled, but we have an access token in plstore,
    ;; error out, tell user to remove plstore and start over:
    ((and mastodon-auth-use-auth-source
-         (let* ((plstore (plstore-open mastodon-client--token-file))
-                (entry
-                 (plstore-get plstore
-                              (format "user-%s" mastodon-active-user))))
-           (plist-get (cdr entry) :access_token)))
+         (let ((entry (mastodon-client--general-read
+                       (concat "user-"
+                               (mastodon-client--form-user-from-vars)))))
+           (plist-get entry :access_token)))
     (user-error "You have enabled auth source, but there is an access token\
  in your plstore. Call `mastodon-forget-all-logins', and try again.\
  If you believe this message is in error, please contact us on the\



reply via email to

[Prev in Thread] Current Thread [Next in Thread]