mirror of
https://example.com
synced 2024-11-24 21:36:40 +09:00
fix: 🐛 Don't show image previews if NSFW
Closes #9636
This commit is contained in:
parent
8f2ae33511
commit
de17a10bb6
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ block vars
|
|||
- const isRenote = note.renote && note.text == null && note.fileIds.length == 0 && note.poll == null;
|
||||
- const isImage = note.files.length !== 0 && note.files[0].type.startsWith('image');
|
||||
- const isVideo = note.files.length !== 0 && note.files[0].type.startsWith('video');
|
||||
- const imageUrl = isImage ? note.files[0].url : isVideo ? note.files[0].thumbnailUrl : avatarUrl;
|
||||
- const imageUrl = isImage ? note.files[0].url : isVideo ? note.files[0].thumbnailUrl : avatarUrl;
|
||||
|
||||
block title
|
||||
= `${title} | ${instanceName}`
|
||||
|
@ -23,7 +23,7 @@ block og
|
|||
meta(property='og:description' content= summary)
|
||||
meta(property='og:url' content= url)
|
||||
meta(property='og:image' content= imageUrl)
|
||||
if isImage
|
||||
if isImage && !note.files[0].isSensitive
|
||||
meta(property='og:image:width' content=note.files[0].properties.width)
|
||||
meta(property='og:image:height' content=note.files[0].properties.height)
|
||||
meta(property='og:image:type' content=note.files[0].type)
|
||||
|
|
Loading…
Reference in a new issue