Update FederationController

This commit is contained in:
Daniel Supernault 2018-11-18 21:46:08 -07:00
parent 90d690db8e
commit 143e4e4ef6
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -167,27 +167,7 @@ XML;
public function userInbox(Request $request, $username)
{
// if (config('pixelfed.activitypub_enabled') == false || config('pixelfed.ap_inbox') == false) {
// abort(403, 'Inbox support disabled');
// }
return;
$type = [
'application/activity+json'
];
if (in_array($request->header('Content-Type'), $type) == false) {
abort(500, 'Invalid request');
}
$profile = Profile::whereUsername($username)->firstOrFail();
$headers = [
'date' => $request->header('date'),
'signature' => $request->header('signature'),
'digest' => $request->header('digest'),
'content-type' => $request->header('content-type'),
'path' => $request->getRequestUri(),
'host' => $request->getHttpHost()
];
InboxWorker::dispatch($headers, $profile, $request->all());
// todo
}
public function userFollowing(Request $request, $username)