From 44dee9b974b34a28822e292920eb67d96da3a4b0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 10 Dec 2018 21:37:16 -0700 Subject: [PATCH] Update Status model, fix thumbnail bug --- app/Status.php | 4 ++-- config/pixelfed.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Status.php b/app/Status.php index 1b4a699c2..de87c06d0 100644 --- a/app/Status.php +++ b/app/Status.php @@ -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=='; } diff --git a/config/pixelfed.php b/config/pixelfed.php index c4c55bfdb..7b71d5bcb 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -23,7 +23,7 @@ return [ | This value is the version of your PixelFed instance. | */ - 'version' => '0.5.2', + 'version' => '0.5.3', /* |--------------------------------------------------------------------------