]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
all endpoints are now working
[friendica.git] / mod / display.php
index 21e28d5617250d2e76e38595a678ff7d63b0ffe8..ff98e689d38b2aac51274a2b0b1f80357b48e2b7 100644 (file)
@@ -77,10 +77,10 @@ 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']);
+               if (DBA::isResult($wall_item)) {
+                       $data = ActivityPub::createObjectFromItemID($wall_item['id']);
                        echo json_encode($data);
                        exit();
                }