1
0
Fork 0

Update StatusController

This commit is contained in:
Daniel Supernault 2019-11-22 23:35:13 -07:00
parent d2c53dc56a
commit 98ad593654
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 7 additions and 1 deletions

View File

@ -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')) {
return $this->showActivityPub($request, $status);
}
@ -72,7 +78,7 @@ class StatusController extends Controller
{
abort(404);
$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) {
return view('status.embed-removed');
}