From 0b48cd4b41009d229c3f626e365d670c93ff662c Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 12 Feb 2022 11:37:07 +0100 Subject: use tl--field to get media attachments info --- lisp/mastodon-tl.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 66b8baa..c1b0b51 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -351,12 +351,10 @@ image media from the byline." (defun mastodon-tl--get-media-types (toot) "Return a list of the media attachment types of the TOOT at point." - (let* ((attachments (or (alist-get 'media_attachments - (alist-get 'reblog toot)) - (alist-get 'media_attachments toot)))) + (let* ((attachments (mastodon-tl--field 'media_attachments toot))) (mapcar (lambda (x) (alist-get 'type x)) - medias))) + attachments))) (defun mastodon-tl--get-attachments-for-byline (toot) "Return a list of attachment URLs and types for TOOT. -- cgit v1.2.3