diff options
| author | mousebot <mousebot@riseup.net> | 2021-09-08 16:57:13 +0200 | 
|---|---|---|
| committer | mousebot <mousebot@riseup.net> | 2021-09-08 16:57:13 +0200 | 
| commit | 99a69f0cb267dcc22e3e1476f0e9f8d6dc46faa7 (patch) | |
| tree | f511726320cdc0659c21272734938f50b765b81c | |
| parent | e1f9acd7c1e71b1bbaa3b6b4aca237156f3d614f (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.
| -rw-r--r-- | lisp/mastodon-tl.el | 5 | 
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  | 
