1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 16:53:17 +00:00

Update PublicApiController

This commit is contained in:
Daniel Supernault 2019-02-24 23:28:35 -07:00
parent fcef8c9a2f
commit 41525e07d8
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -266,7 +266,21 @@ class PublicApiController extends Controller
->limit($limit)
->get();
} else {
$timeline = Status::whereHas('media')
$timeline = Status::select(
'id',
'uri',
'caption',
'rendered',
'profile_id',
'type',
'in_reply_to_id',
'reblog_of_id',
'is_nsfw',
'scope',
'local',
'created_at',
'updated_at'
)->whereHas('media')
->whereLocal(true)
->whereNull('uri')
->whereNotIn('profile_id', $filtered)
@ -355,7 +369,21 @@ class PublicApiController extends Controller
->limit($limit)
->get();
} else {
$timeline = Status::whereHas('media')
$timeline = Status::select(
'id',
'uri',
'caption',
'rendered',
'profile_id',
'type',
'in_reply_to_id',
'reblog_of_id',
'is_nsfw',
'scope',
'local',
'created_at',
'updated_at'
)->whereHas('media')
->whereLocal(true)
->whereNull('uri')
->whereIn('profile_id', $following)