X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpubsub.php;h=a740b7b81da89c5e03ea6e5d5e03401c0cfbb25d;hb=a98d3213767392dcce399188f65b5f976caf98e6;hp=f8f62754de8630359453f560530e2239e03736d0;hpb=23b10cf2ae5fe10ba21a4b43e1aae17818647661;p=friendica.git diff --git a/mod/pubsub.php b/mod/pubsub.php index f8f62754de..a740b7b81d 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -1,6 +1,6 @@ getArgc() > 1) ? trim(DI::args()->getArgv()[1]) : ''); $contact_id = ((DI::args()->getArgc() > 2) ? intval(DI::args()->getArgv()[2]) : 0 ); - if ($_SERVER['REQUEST_METHOD'] === 'GET') { + if (DI::args()->getMethod() === App\Router::GET) { $hub_mode = trim($_GET['hub_mode'] ?? ''); $hub_topic = trim($_GET['hub_topic'] ?? ''); $hub_challenge = trim($_GET['hub_challenge'] ?? ''); @@ -144,7 +145,7 @@ function pubsub_post(App $a) } // We only import feeds from OStatus here - if ($contact['network'] != Protocol::OSTATUS) { + if (!in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::OSTATUS])) { Logger::warning('Unexpected network', ['contact' => $contact]); hub_post_return(); }