From 549cca828aeb92e882b09346e2ccbb60a3fe9faf Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 8 May 2023 19:51:42 +0200 Subject: remove useless fun profile--account-field --- lisp/mastodon-profile.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index b878352..8c55155 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -509,7 +509,7 @@ This endpoint only holds a few preferences. For others, see Returns an alist. FIELDS means provide a fields vector fetched by other means." (let ((fields (or fields - (mastodon-profile--account-field account 'fields)))) + (alist-get 'fields account)))) (when fields (mastodon-tl--map-alist-vals-to-alist 'name 'value fields)))) @@ -528,7 +528,7 @@ FIELDS means provide a fields vector fetched by other means." (defun mastodon-profile--get-statuses-pinned (account) "Fetch the pinned toots for ACCOUNT." - (let* ((id (mastodon-profile--account-field account 'id)) + (let* ((id (alist-get 'id account)) (args `(("pinned" . "true"))) (url (mastodon-http--api (format "accounts/%s/statuses" id)))) (mastodon-http--get-json url args))) @@ -707,11 +707,6 @@ IMG-TYPE is the JSON key from the account data." (message "Loading your profile...") (mastodon-profile--show-user (mastodon-auth--get-account-name))) -(defun mastodon-profile--account-field (account field) - "Return FIELD from the ACCOUNT. -FIELD is used to identify regions under `account'." - (cdr (assoc field account))) - (defun mastodon-profile--add-author-bylines (tootv) "Convert TOOTV into a author-bylines and insert. Also insert their profile note. -- cgit v1.2.3