From 99a69f0cb267dcc22e3e1476f0e9f8d6dc46faa7 Mon Sep 17 00:00:00 2001 From: mousebot Date: Wed, 8 Sep 2021 16:57:13 +0200 Subject: 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. --- lisp/mastodon-tl.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp') 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 -- cgit v1.2.3