mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update PublicApiController, fix bug that does not show private posts in home timeline
This commit is contained in:
parent
c480a5a023
commit
f86fc83cbd
2 changed files with 12 additions and 0 deletions
|
@ -211,6 +211,10 @@ class PublicApiController extends Controller
|
|||
'limit' => 'nullable|integer|max:20'
|
||||
]);
|
||||
|
||||
if(config('instance.timeline.local.is_public') == false && !Auth::check()) {
|
||||
abort(403, 'Authentication required.');
|
||||
}
|
||||
|
||||
$page = $request->input('page');
|
||||
$min = $request->input('min_id');
|
||||
$max = $request->input('max_id');
|
||||
|
@ -332,6 +336,8 @@ class PublicApiController extends Controller
|
|||
->pluck('id');
|
||||
});
|
||||
|
||||
$private = $private->diff($following)->flatten();
|
||||
|
||||
$filters = UserFilter::whereUserId($pid)
|
||||
->whereFilterableType('App\Profile')
|
||||
->whereIn('filter_type', ['mute', 'block'])
|
||||
|
|
|
@ -11,5 +11,11 @@ return [
|
|||
'announcement' => [
|
||||
'enabled' => env('INSTANCE_ANNOUNCEMENT_ENABLED', true),
|
||||
'message' => env('INSTANCE_ANNOUNCEMENT_MESSAGE', 'Example announcement message.<br><span class="font-weight-normal">Something else here</span>')
|
||||
],
|
||||
|
||||
'timeline' => [
|
||||
'local' => [
|
||||
'is_public' => env('INSTANCE_PUBLIC_LOCAL_TIMELINE', false)
|
||||
]
|
||||
]
|
||||
];
|
Loading…
Reference in a new issue