diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-18 22:17:45 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-19 13:21:37 +0100 |
commit | 5d62213b4f8f92cb974c24c4ab0fc373fe806115 (patch) | |
tree | baf36c533fe7e81538c7428408266a6026401b78 /lisp/mastodon-profile.el | |
parent | d6470dd725c0da74345e1ed8bf40822730e0c004 (diff) |
refactor tl--map-alist-to-alist
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 684b11f..b77bdac 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -540,10 +540,7 @@ FIELDS means provide a fields vector fetched by other means." (let ((fields (or fields (mastodon-profile--account-field account 'fields)))) (when fields - (mapcar (lambda (el) - (cons (alist-get 'name el) - (alist-get 'value el))) - fields)))) + (mastodon-tl-map-alist-to-alist 'name 'value fields)))) (defun mastodon-profile--fields-insert (fields) "Format and insert field pairs (a.k.a profile metadata) in FIELDS." @@ -891,11 +888,7 @@ Currently limited to 100 handles. If not found, try (url (mastodon-http--api endpoint)) (response (mastodon-http--get-json url `(("limit" . "100")))) - (handles (mapcar (lambda (x) - (cons - (alist-get 'acct x) - (alist-get 'id x))) - response)) + (handles (mastodon-tl-map-alist-to-alist 'acct 'id response)) (choice (completing-read "Remove from followers: " handles)) (id (alist-get choice handles nil nil 'equal))) |