Add admin setting to enable OG previews for sensitive media (#7962)

This commit is contained in:
Eugen Rochko
2018-07-06 02:15:56 +02:00
committed by GitHub
parent 404c7702ec
commit f89c595ea0
6 changed files with 15 additions and 1 deletions

View File

@ -1,4 +1,4 @@
- if activity.is_a?(Status) && activity.non_sensitive_with_media?
- if activity.is_a?(Status) && (activity.non_sensitive_with_media? || (activity.with_media? && Setting.preview_sensitive_media))
- player_card = false
- activity.media_attachments.each do |media|
- if media.image?