From dfa1db177bfb2c1d5ff044c99a78a380da89ec33 Mon Sep 17 00:00:00 2001 From: mousebot Date: Tue, 8 Jun 2021 09:49:58 +0200 Subject: use mastodon-auth--user-acct instead of get-account-name in mastodon the former first checks if the value is stored in var mastodon-auth--acct-alist, and only makes a request if it doesn't get the handle from there. and if run it also stores the value. --- lisp/mastodon.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 50acc18..e166671 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -76,6 +76,7 @@ (autoload 'mastodon-async--stream-home "mastodon-async") (autoload 'mastodon-async--stream-notifications "mastodon-async") (autoload 'mastodon-profile--update-user-profile-note "mastodon-profile") +(autoload 'mastodon-auth--user-acct "mastodon-auth") (defgroup mastodon nil "Interface with Mastodon." @@ -185,7 +186,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (let* ((tls (list "home" "local" "federated" - (concat (mastodon-auth--get-account-name) "-statuses") ; profile + (concat (mastodon-auth--user-acct) "-statuses") ; profile "favourites" "search")) (buffer (cl-some (lambda (el) @@ -194,7 +195,7 @@ Use. e.g. \"%c\" for your locale's date and time format." (if buffer (switch-to-buffer buffer) (mastodon-tl--get-home-timeline) - (message "Loading Mastodon account %s on %s..." (mastodon-auth--get-account-name) mastodon-instance-url)))) + (message "Loading Mastodon account %s on %s..." (mastodon-auth--user-acct) mastodon-instance-url)))) ;;;###autoload (defun mastodon-toot (&optional user reply-to-id) -- cgit v1.2.3