mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-19 21:11:26 +00:00
Merge pull request #769 from pixelfed/frontend-ui-refactor
Update PublicApiController
This commit is contained in:
commit
a5bfe660fa
1 changed files with 8 additions and 0 deletions
|
@ -233,6 +233,8 @@ class PublicApiController extends Controller
|
||||||
$dir = $min ? '>' : '<';
|
$dir = $min ? '>' : '<';
|
||||||
$id = $min ?? $max;
|
$id = $min ?? $max;
|
||||||
$timeline = Status::whereHas('media')
|
$timeline = Status::whereHas('media')
|
||||||
|
->whereLocal(true)
|
||||||
|
->whereNull('uri')
|
||||||
->where('id', $dir, $id)
|
->where('id', $dir, $id)
|
||||||
->whereNotIn('profile_id', $filtered)
|
->whereNotIn('profile_id', $filtered)
|
||||||
->whereNull('in_reply_to_id')
|
->whereNull('in_reply_to_id')
|
||||||
|
@ -244,6 +246,8 @@ class PublicApiController extends Controller
|
||||||
->get();
|
->get();
|
||||||
} else {
|
} else {
|
||||||
$timeline = Status::whereHas('media')
|
$timeline = Status::whereHas('media')
|
||||||
|
->whereLocal(true)
|
||||||
|
->whereNull('uri')
|
||||||
->whereNotIn('profile_id', $filtered)
|
->whereNotIn('profile_id', $filtered)
|
||||||
->whereNull('in_reply_to_id')
|
->whereNull('in_reply_to_id')
|
||||||
->whereNull('reblog_of_id')
|
->whereNull('reblog_of_id')
|
||||||
|
@ -295,6 +299,8 @@ class PublicApiController extends Controller
|
||||||
$dir = $min ? '>' : '<';
|
$dir = $min ? '>' : '<';
|
||||||
$id = $min ?? $max;
|
$id = $min ?? $max;
|
||||||
$timeline = Status::whereHas('media')
|
$timeline = Status::whereHas('media')
|
||||||
|
->whereLocal(true)
|
||||||
|
->whereNull('uri')
|
||||||
->where('id', $dir, $id)
|
->where('id', $dir, $id)
|
||||||
->whereIn('profile_id', $following)
|
->whereIn('profile_id', $following)
|
||||||
->whereNotIn('profile_id', $filtered)
|
->whereNotIn('profile_id', $filtered)
|
||||||
|
@ -307,6 +313,8 @@ class PublicApiController extends Controller
|
||||||
->get();
|
->get();
|
||||||
} else {
|
} else {
|
||||||
$timeline = Status::whereHas('media')
|
$timeline = Status::whereHas('media')
|
||||||
|
->whereLocal(true)
|
||||||
|
->whereNull('uri')
|
||||||
->whereIn('profile_id', $following)
|
->whereIn('profile_id', $following)
|
||||||
->whereNotIn('profile_id', $filtered)
|
->whereNotIn('profile_id', $filtered)
|
||||||
->whereNull('in_reply_to_id')
|
->whereNull('in_reply_to_id')
|
||||||
|
|
Loading…
Reference in a new issue