aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 61c612a..6e80db3 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1504,6 +1504,13 @@ timeline."
;;; UTILITIES
+;; consider having this return an id / acct alist
+(defun mastodon-tl--map-get-accts (alist)
+ "Return a list of handles from ALIST."
+ (mapcar (lambda (x)
+ (alist-get 'acct x))
+ alist))
+
(defun mastodon-tl--symbol (name)
"Return the unicode symbol (as a string) corresponding to NAME.
If symbol is not displayable, an ASCII equivalent is returned. If
@@ -1872,9 +1879,7 @@ Action must be either \"unblock\" or \"unmute\"."
"mutes")))
(url (mastodon-http--api endpoint))
(json (mastodon-http--get-json url))
- (accts (mapcar (lambda (user)
- (alist-get 'acct user))
- json)))
+ (accts (mastodon-tl--map-get-accts json)))
(when accts
(completing-read (format "Handle of user to %s: " action)
accts