aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-09-08 16:57:13 +0200
committermousebot <mousebot@riseup.net>2021-09-08 16:57:13 +0200
commit99a69f0cb267dcc22e3e1476f0e9f8d6dc46faa7 (patch)
treef511726320cdc0659c21272734938f50b765b81c /lisp/mastodon-tl.el
parente1f9acd7c1e71b1bbaa3b6b4aca237156f3d614f (diff)
fix RET/i not working on image attachments in notifications.
notifications only have a url and a preview_url, but no remote_url. we still prefer remote_url in home timelines (inc. boosts) though.
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index b7c14e2..d34371a 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -641,7 +641,10 @@ message is a link which unhides/hides the main body."
(let ((preview-url
(cdr (assoc 'preview_url media-attachement)))
(remote-url
- (cdr (assoc 'remote_url media-attachement))))
+ (if (cdr (assoc 'remote_url media-attachement))
+ (cdr (assoc 'remote_url media-attachement))
+ ;; fallback b/c notifications don't have remote_url
+ (cdr (assoc 'url media-attachement)))))
(if mastodon-tl--display-media-p
(mastodon-media--get-media-link-rendering
preview-url remote-url) ; 2nd arg for shr-browse-url