fix(home): update where clause when getting all podcasts to prevent draft podcasts from showing up

This commit is contained in:
Yassine Doghri 2023-08-22 15:00:01 +00:00
parent 11aa3586a0
commit 7a1eea58d3
1 changed files with 2 additions and 0 deletions

View File

@ -185,11 +185,13 @@ class PodcastModel extends Model
$fediverseTablePrefix . 'posts.actor_id = podcasts.actor_id',
'left'
)
->groupStart()
->where(
'`' . $fediverseTablePrefix . 'posts`.`published_at` <= UTC_TIMESTAMP()',
null,
false
)->orWhere($fediverseTablePrefix . 'posts.published_at', null)
->groupEnd()
->groupBy('podcasts.actor_id')
->orderBy('max_published_at', 'DESC');
} elseif ($orderBy === 'created_desc') {