diff options
author | mousebot <mousebot@riseup.net> | 2021-06-08 09:49:58 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-06-08 14:45:44 +0200 |
commit | dfa1db177bfb2c1d5ff044c99a78a380da89ec33 (patch) | |
tree | b8514f29d38a967b79f551bf0fa1eb146e12d5a9 /lisp/mastodon.el | |
parent | 0c5139649cfd1698049a06b7cbcdabba4c95e17a (diff) |
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.
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r-- | lisp/mastodon.el | 5 |
1 files changed, 3 insertions, 2 deletions
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) |