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

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

[nongnu] elpa/mastodon 8f4b5f5ad8 11/11: refactor mastodon-return-creden


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon 8f4b5f5ad8 11/11: refactor mastodon-return-credential-account
Date: Wed, 30 Aug 2023 09:59:53 -0400 (EDT)

branch: elpa/mastodon
commit 8f4b5f5ad8c6dcb867d864ea179934136dfe2640
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    refactor mastodon-return-credential-account
---
 lisp/mastodon.el | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index bc06570b61..1533af04b4 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -296,16 +296,15 @@ Either from `mastodon-profile-credential-account' or from 
the
 server.
 FORCE means to fetch from the server and update
 `mastodon-profile-credential-account'."
-  (if force
-      (setq mastodon-profile-credential-account
-            (mastodon-http--get-json
-             (mastodon-http--api "accounts/verify_credentials")
-             nil :silent))
-    (or mastodon-profile-credential-account
-        (setq mastodon-profile-credential-account
-              (mastodon-http--get-json
+  (let ((req '(mastodon-http--get-json
                (mastodon-http--api "accounts/verify_credentials")
-               nil :silent)))))
+               nil :silent)))
+    (if force
+        (setq mastodon-profile-credential-account
+              (eval req))
+      (or mastodon-profile-credential-account
+          (setq mastodon-profile-credential-account
+                (eval req))))))
 
 ;;;###autoload
 (defun mastodon-toot (&optional user reply-to-id reply-json)



reply via email to

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