From e265b8887dbd883bc7ca04832dc67ffe46966889 Mon Sep 17 00:00:00 2001 From: mayaeh Date: Thu, 5 Sep 2019 13:14:30 +0900 Subject: [PATCH] Fix NotificationMailer failing when receiving mention with media from remote instance (#11765) --- app/views/notification_mailer/_status.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/notification_mailer/_status.html.haml b/app/views/notification_mailer/_status.html.haml index 40f3aa88a73..e992e5563dc 100644 --- a/app/views/notification_mailer/_status.html.haml +++ b/app/views/notification_mailer/_status.html.haml @@ -36,7 +36,10 @@ - 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}")