From 79cefa37390fc09a5d25e2e387480b7759c3f276 Mon Sep 17 00:00:00 2001 From: Isabelle Knott Date: Thu, 13 Apr 2017 09:59:43 -0400 Subject: [PATCH] Do not show media attachment as og:image if it was marked as NSFW (#1693) --- app/views/stream_entries/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml index f37fb79196..8629467503 100644 --- a/app/views/stream_entries/show.html.haml +++ b/app/views/stream_entries/show.html.haml @@ -11,7 +11,7 @@ - else %meta{ property: 'og:description', content: @stream_entry.activity.content }/ - - if @stream_entry.activity.is_a?(Status) && @stream_entry.activity.media_attachments.size > 0 + - if @stream_entry.activity.is_a?(Status) && !@stream_entry.activity.sensitive? && @stream_entry.activity.media_attachments.size > 0 %meta{ property: 'og:image', content: full_asset_url(@stream_entry.activity.media_attachments.first.file.url(:small)) }/ - else %meta{ property: 'og:image', content: full_asset_url(@account.avatar.url(:original)) }/