]> cat aescling's git repositories - mastodon.git/commitdiff
Fix NotificationMailer failing when receiving mention with media from remote instance...
authormayaeh <mayaeh@marimo-net.org>
Thu, 5 Sep 2019 04:14:30 +0000 (13:14 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 5 Sep 2019 04:14:30 +0000 (06:14 +0200)
app/views/notification_mailer/_status.html.haml

index 40f3aa88a736521b980df83efb57d86bada47060..e992e5563dc82a51a6ccddf6811fbee4fa143c8e 100644 (file)
                                 - if status.media_attachments.size > 0
                                   %p
                                     - status.media_attachments.each do |a|
-                                      = link_to medium_url(a), medium_url(a)
+                                      - if status.local?
+                                        = link_to medium_url(a), medium_url(a)
+                                      - else
+                                        = link_to a.remote_url, a.remote_url
 
                               %p.status-footer
                                 = link_to l(status.created_at), web_url("statuses/#{status.id}")