mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update StatusController
This commit is contained in:
parent
d2c53dc56a
commit
98ad593654
1 changed files with 7 additions and 1 deletions
|
@ -51,6 +51,12 @@ class StatusController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($status->type == 'archived') {
|
||||||
|
if(Auth::user()->profile_id !== $status->profile_id) {
|
||||||
|
abort(404);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->wantsJson() && config('federation.activitypub.enabled')) {
|
if ($request->wantsJson() && config('federation.activitypub.enabled')) {
|
||||||
return $this->showActivityPub($request, $status);
|
return $this->showActivityPub($request, $status);
|
||||||
}
|
}
|
||||||
|
@ -72,7 +78,7 @@ class StatusController extends Controller
|
||||||
{
|
{
|
||||||
abort(404);
|
abort(404);
|
||||||
$profile = Profile::whereNull('status')->whereUsername($username)->first();
|
$profile = Profile::whereNull('status')->whereUsername($username)->first();
|
||||||
$status = Status::whereScope('private')->find($id);
|
$status = Status::whereProfileId($profile->id)->whereScope('public')->find($id);
|
||||||
if(!$profile || !$status) {
|
if(!$profile || !$status) {
|
||||||
return view('status.embed-removed');
|
return view('status.embed-removed');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue