Sensitive previews are now blurred

This commit is contained in:
Michael 2024-02-06 16:15:58 +00:00
parent 9b4ade4542
commit 0a6dff0618
3 changed files with 31 additions and 20 deletions

View file

@ -166,7 +166,9 @@ class Photo extends BaseApi
$stamp = microtime(true);
$imgdata = MPhoto::getImageDataForPhoto($photo);
if (empty($request['blur']) || empty($photo['blurhash'])) {
$imgdata = MPhoto::getImageDataForPhoto($photo);
}
if (empty($imgdata) && empty($photo['blurhash'])) {
throw new HTTPException\NotFoundException();
} elseif (empty($imgdata) && !empty($photo['blurhash'])) {