|
|
|
@ -2536,7 +2536,8 @@ class ApiV1Controller extends Controller
|
|
|
|
|
AccountService::setLastActive($user->id);
|
|
|
|
|
$domainBlocks = UserFilterService::domainBlocks($user->profile_id);
|
|
|
|
|
|
|
|
|
|
if($remote && config('instance.timeline.network.cached')) {
|
|
|
|
|
if($remote) {
|
|
|
|
|
if(config('instance.timeline.network.cached')) {
|
|
|
|
|
Cache::remember('api:v1:timelines:network:cache_check', 10368000, function() {
|
|
|
|
|
if(NetworkTimelineService::count() == 0) {
|
|
|
|
|
NetworkTimelineService::warmCache(true, config('instance.timeline.network.cache_dropoff'));
|
|
|
|
@ -2550,6 +2551,23 @@ class ApiV1Controller extends Controller
|
|
|
|
|
} else {
|
|
|
|
|
$feed = NetworkTimelineService::get(0, $limit + 5);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$feed = Status::select(
|
|
|
|
|
'id',
|
|
|
|
|
'profile_id',
|
|
|
|
|
'type',
|
|
|
|
|
'visibility',
|
|
|
|
|
'in_reply_to_id',
|
|
|
|
|
'reblog_of_id'
|
|
|
|
|
)
|
|
|
|
|
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
|
|
|
|
|
->where('visibility', 'public')
|
|
|
|
|
->whereLocal(false)
|
|
|
|
|
->orderByDesc('id')
|
|
|
|
|
->take(($limit * 2))
|
|
|
|
|
->pluck('id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($local || !$remote && !$local) {
|
|
|
|
|