From bfaf8e15b230e12456e7429bf40c63b2f4ca343e Mon Sep 17 00:00:00 2001 From: alexjgriffith Date: Mon, 1 May 2017 16:17:31 -0400 Subject: Removed the superfluous if around mapconcat and Renamed images media preview --- lisp/mastodon-tl.el | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index befea1f..bfb185a 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -178,20 +178,15 @@ also render the html" ""))) (defun mastodon-tl--media (toot) - "Retreive a media attachment link for TOOT if one exists." + "Retrieve a media attachment link for TOOT if one exists." (let ((media (mastodon-tl--field 'media_attachments toot))) - (if (> (length media) 0 ) - ;; Extract the preview_url, other options here - ;; are url and remote_url (mapconcat - (lambda (image) + (lambda (media-preview) (concat "Media_Link:: " (mastodon-tl--set-face - (cdr (assoc 'preview_url image)) + (cdr (assoc 'preview_url media-preview)) 'mouse-face 'nil))) - media "\n") - ;; Otherwise return an empty string - ""))) + media "\n"))) (defun mastodon-tl--content (toot) "Retrieve text content from TOOT." -- cgit v1.2.3