Update Status model, fix thumbnail bug

pull/631/head
Daniel Supernault 2018-12-10 21:37:16 -07:00
rodzic 564fd93290
commit 44dee9b974
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -77,9 +77,9 @@ class Status extends Model
public function thumb($showNsfw = false)
{
return Cache::remember('status:thumb:'.$this->id, 40320, function() use ($showNsfw) {
$type = $this->viewType();
$type = $this->type ?? $this->setType();
$is_nsfw = !$showNsfw ? $this->is_nsfw : false;
if ($this->media->count() == 0 || $is_nsfw || !in_array($type,['image', 'album', 'video'])) {
if ($this->media->count() == 0 || $is_nsfw || !in_array($type,['photo', 'photo:album'])) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';
}

Wyświetl plik

@ -23,7 +23,7 @@ return [
| This value is the version of your PixelFed instance.
|
*/
'version' => '0.5.2',
'version' => '0.5.3',
/*
|--------------------------------------------------------------------------