aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2023-12-22 15:50:57 +0100
committermarty hiatt <martianhiatus@riseup.net>2023-12-22 15:50:57 +0100
commit2f68bc776d69638eb4d83ad06a4bc3313c0e83e2 (patch)
tree329fb55d49ec0379852f268fd5b1580f2ed43c4e /lisp
parentf5a19ad534df988e8924ecb97c2360506c947632 (diff)
tl--content: only call tl--media if we have media
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ca09a0f..a8a1264 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1308,11 +1308,13 @@ in which case play first video or gif from current toot."
"Retrieve text content from TOOT.
Runs `mastodon-tl--render-text' and fetches poll or media."
(let* ((content (mastodon-tl--field 'content toot))
- (poll-p (mastodon-tl--field 'poll toot)))
+ (poll-p (mastodon-tl--field 'poll toot))
+ (media-p (mastodon-tl--field 'media_attachments toot)))
(concat (mastodon-tl--render-text content toot)
(when poll-p
(mastodon-tl--get-poll toot))
- (mastodon-tl--media toot))))
+ (when media-p
+ (mastodon-tl--media toot)))))
(defun mastodon-tl--prev-item-id ()
"Return the id of the last toot inserted into the buffer."