1
0
Fork 0
forked from mirror/pixelfed

Update Status model

This commit is contained in:
Daniel Supernault 2018-11-03 21:48:57 -06:00
parent 0f35996ed7
commit 69606293b3
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -52,7 +52,7 @@ class Status extends Model
{
$type = $this->viewType();
$is_nsfw = !$showNsfw ? $this->is_nsfw : false;
if ($this->media->count() == 0 || $is_nsfw || !in_array($type,['image', 'album'])) {
if ($this->media->count() == 0 || $is_nsfw || !in_array($type,['image', 'album', 'video'])) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';
}
@ -66,7 +66,7 @@ class Status extends Model
$path = config('app.url')."/p/{$username}/{$id}";
if (!is_null($this->in_reply_to_id)) {
$pid = $this->in_reply_to_id;
$path = config('app.url')."/p/{$username}/{$pid}/c/{$id}";
$path = "{$this->parent()->url()}#comment-{$id}";
}
return url($path);