aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-18 21:32:26 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-19 13:21:37 +0100
commit135443c63d26d0b77be5370e693aff8643d5078b (patch)
treee0e255b424e58c1cd56659f466fd3bad91f21c2f /lisp/mastodon-toot.el
parent58bab7b01496f2d26dd3d766ff060152daef25e7 (diff)
factor out -tl--map-get-accts
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 87b4afb..1d91f84 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -75,6 +75,7 @@
(autoload 'mastodon-tl--find-property-range "mastodon-tl")
(autoload 'mastodon-tl--find-property-range "mastodon-tl")
(autoload 'mastodon-tl--goto-next-toot "mastodon-tl")
+(autoload 'mastodon-tl--map-get-accts "mastodon-views")
(autoload 'mastodon-tl--property "mastodon-tl")
(autoload 'mastodon-tl--reload-timeline-or-profile "mastodon-tl")
(autoload 'mastodon-tl--render-text "mastodon-tl")
@@ -450,7 +451,7 @@ With FAVOURITE, list favouriters, else list boosters."
(if (eq (caar json) 'error)
(error "%s (Status does not exist or is private)"
(alist-get 'error json))
- (let ((handles (mapcar (lambda (x) (alist-get 'acct x)) json))
+ (let ((handles (mastodon-tl--map-get-accts json))
(type-string (if favourite "Favouriters" "Boosters")))
(if (not handles)
(error "Looks like this toot has no %s" type-string)
@@ -920,8 +921,7 @@ Federated user: `username@host.co`."
(alist-get 'mentions (alist-get 'reblog status))
(alist-get 'mentions status))))
;; reverse does not work on vectors in 24.5
- (mapcar (lambda(x) (alist-get 'acct x))
- (reverse mentions))))
+ (mastodon-tl--map-get-accts (reverse mentions))))
(defun mastodon-toot--get-bounds (regex)
"Get bounds of tag or handle before point using REGEX."