aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexjgriffith <griffitaj@gmail.com>2017-05-01 16:17:31 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-05-05 11:41:18 -0400
commitbfaf8e15b230e12456e7429bf40c63b2f4ca343e (patch)
tree8dd1885b040027d61fb2b4b8cd8b00bb368a87f5
parentc99625f5b6df932afe75b1f7535509592e639442 (diff)
Removed the superfluous if around mapconcat and Renamed images media preview
-rw-r--r--lisp/mastodon-tl.el13
1 files 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."