Prevent og:image on sensitive posts

pull/6598/head
Daniel Supernault 4 weeks ago
parent 9fff0974cb
commit 3a71cda51f
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -46,10 +46,10 @@ if($displayName && $captionPreview) {
@endsection
@push('meta')@if($mediaCount && $s['pf_type'] === "photo" || $s['pf_type'] === "photo:album")
@push('meta')@if($mediaCount && !$s['sensitive'] && $s['pf_type'] === "photo" || $s['pf_type'] === "photo:album")
<meta property="og:image" content="{{$s['media_attachments'][0]['url']}}">
<meta name="twitter:card" content="summary_large_image">
@elseif($mediaCount && $s['pf_type'] === "video" || $s['pf_type'] === "video:album")<meta property="og:video" content="{{$s['media_attachments'][0]['url']}}">
@elseif($mediaCount && !$s['sensitive'] && $s['pf_type'] === "video" || $s['pf_type'] === "video:album")<meta property="og:video" content="{{$s['media_attachments'][0]['url']}}">
<meta property="og:image" content="{{$s['media_attachments'][0]['preview_url']}}">
<meta name="twitter:card" content="summary">
@else

Loading…
Cancel
Save