Merge pull request #5815 from annando/ap2

The ActivityPub functionality is now split into 4 files
This commit is contained in:
Hypolite Petovan 2018-10-04 09:10:17 -04:00 committed by GitHub
commit 743e7d3ecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1986 additions and 1844 deletions

View file

@ -29,7 +29,7 @@ class Followers extends BaseModule
$page = defaults($_REQUEST, 'page', null);
$followers = ActivityPub::getFollowers($owner, $page);
$followers = ActivityPub\Transmitter::getFollowers($owner, $page);
header('Content-Type: application/activity+json');
echo json_encode($followers);

View file

@ -29,7 +29,7 @@ class Following extends BaseModule
$page = defaults($_REQUEST, 'page', null);
$Following = ActivityPub::getFollowing($owner, $page);
$Following = ActivityPub\Transmitter::getFollowing($owner, $page);
header('Content-Type: application/activity+json');
echo json_encode($Following);

View file

@ -48,7 +48,7 @@ class Inbox extends BaseModule
$uid = 0;
}
ActivityPub::processInbox($postdata, $_SERVER, $uid);
ActivityPub\Receiver::processInbox($postdata, $_SERVER, $uid);
System::httpExit(202);
}

View file

@ -32,7 +32,7 @@ class Objects extends BaseModule
System::httpExit(404);
}
$data = ActivityPub::createObjectFromItemID($item['id']);
$data = ActivityPub\Transmitter::createObjectFromItemID($item['id']);
header('Content-Type: application/activity+json');
echo json_encode($data);

View file

@ -29,7 +29,7 @@ class Outbox extends BaseModule
$page = defaults($_REQUEST, 'page', null);
$outbox = ActivityPub::getOutbox($owner, $page);
$outbox = ActivityPub\Transmitter::getOutbox($owner, $page);
header('Content-Type: application/activity+json');
echo json_encode($outbox);