aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-media.el3
-rw-r--r--lisp/mastodon-tl.el6
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el
index 561327c..894a21a 100644
--- a/lisp/mastodon-media.el
+++ b/lisp/mastodon-media.el
@@ -321,7 +321,8 @@ CAPTION is the image caption if provided."
(concat
(mastodon-tl--propertize-img-str-or-url
"[img]" media-url full-remote-url type help-echo
- (create-image mastodon-media--generic-broken-image-data nil t))
+ (create-image mastodon-media--generic-broken-image-data nil t)
+ nil caption)
" ")))
(provide 'mastodon-media)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 8e3ce4a..97e8bc5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1053,11 +1053,12 @@ message is a link which unhides/hides the main body."
(concat "Media:: " .preview_url) ; string
.preview_url .remote_url .type .description
display-str ; display
- 'shr-link)
+ 'shr-link .description)
"\n")))))
(defun mastodon-tl--propertize-img-str-or-url
- (str media-url full-remote-url type help-echo &optional display face)
+ (str media-url full-remote-url type help-echo
+ &optional display face caption)
"Propertize an media placeholder string \"[img]\" or media URL.
STR is the string to propertize, MEDIA-URL is the preview link,
FULL-REMOTE-URL is the link to the full resolution image on the
@@ -1074,6 +1075,7 @@ HELP-ECHO, DISPLAY, and FACE are the text properties to add."
'mastodon-tab-stop 'image ; for do-link-action-at-point
'image-url full-remote-url ; for shr-browse-image
'keymap mastodon-tl--shr-image-map-replacement
+ 'image-description caption
'help-echo (if (or (string= type "image")
(string= type nil)
(string= type "unknown")) ; handle borked images