1
0
Fork 0

Now sending does finally work - and some AP standards are improved as well

This commit is contained in:
Michael 2018-09-16 20:12:48 +00:00
commit 699a4140f9
5 changed files with 27 additions and 20 deletions

View file

@ -77,7 +77,7 @@ function display_init(App $a)
displayShowFeed($item["id"], false);
}
if (stristr(defaults($_SERVER, 'HTTP_ACCEPT', ''), 'application/activity+json')) {
if (ActivityPub::isRequest()) {
$wall_item = Item::selectFirst(['id', 'uid'], ['guid' => $item['guid'], 'wall' => true]);
if ($wall_item['uid'] == 180) {
$data = ActivityPub::createActivityFromItem($wall_item['id']);

View file

@ -50,7 +50,7 @@ function profile_init(App $a)
DFRN::autoRedir($a, $which);
}
if (stristr(defaults($_SERVER, 'HTTP_ACCEPT', ''), 'application/activity+json')) {
if (ActivityPub::isRequest()) {
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]);
if ($user['uid'] == 180) {
$data = ActivityPub::profile($user['uid']);