From ef0db16833485400704c1b65d5a4e464256a94b7 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 22 Aug 2023 18:20:30 +0200 Subject: new fun: mastodon-return-credential-account, var: mastodon-profile-credential-account FIX #480. --- lisp/mastodon-auth.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lisp/mastodon-auth.el') diff --git a/lisp/mastodon-auth.el b/lisp/mastodon-auth.el index 4d43962..eb57368 100644 --- a/lisp/mastodon-auth.el +++ b/lisp/mastodon-auth.el @@ -44,6 +44,7 @@ (autoload 'mastodon-http--concat-params-to-url "mastodon-http") (autoload 'mastodon-http--get-json "mastodon-http") (autoload 'mastodon-http--post "mastodon-http") +(autoload 'mastodon-return-credential-account "mastodon") (defvar mastodon-instance-url) (defvar mastodon-client-scopes) @@ -209,16 +210,12 @@ Handle any errors from the server." (defun mastodon-auth--get-account-name () "Request user credentials and return an account name." (alist-get 'acct - (mastodon-http--get-json (mastodon-http--api - "accounts/verify_credentials") - nil - :silent))) + (mastodon-return-credential-account))) (defun mastodon-auth--get-account-id () "Request user credentials and return an account name." (alist-get 'id - (mastodon-http--get-json (mastodon-http--api - "accounts/verify_credentials")))) + (mastodon-return-credential-account))) (defun mastodon-auth--user-acct () "Return a mastodon user acct name." -- cgit v1.2.3