mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update StatusController
This commit is contained in:
parent
4bce09b28e
commit
9608307243
1 changed files with 12 additions and 0 deletions
|
@ -21,10 +21,22 @@ class StatusController extends Controller
|
|||
{
|
||||
$user = Profile::whereUsername($username)->firstOrFail();
|
||||
|
||||
if($user->status != null) {
|
||||
return ProfileController::accountCheck($user);
|
||||
}
|
||||
|
||||
$status = Status::whereProfileId($user->id)
|
||||
->whereNotIn('visibility',['draft','direct'])
|
||||
->findOrFail($id);
|
||||
|
||||
if($status->uri) {
|
||||
$url = $status->uri;
|
||||
if(ends_with($url, '/activity')) {
|
||||
$url = str_replace('/activity', '', $url);
|
||||
}
|
||||
return redirect($url);
|
||||
}
|
||||
|
||||
if($status->visibility == 'private' || $user->is_private) {
|
||||
if(!Auth::check()) {
|
||||
abort(403);
|
||||
|
|
Loading…
Reference in a new issue