1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-24 23:26:42 +09:00

Do not show media attachment as og:image if it was marked as NSFW (#1693)

This commit is contained in:
Isabelle Knott 2017-04-13 09:59:43 -04:00 committed by Eugen
parent 093879c177
commit 447b8bc44e

View File

@ -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)) }/