]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
Improved description
[friendica.git] / mod / pubsub.php
index e07b15583c8eb5c3926e5b9a811d3234e54295f4..a740b7b81da89c5e03ea6e5d5e03401c0cfbb25d 100644 (file)
@@ -22,6 +22,7 @@
 use Friendica\App;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
+use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
@@ -38,7 +39,7 @@ function hub_return($valid, $body)
        } else {
                throw new \Friendica\Network\HTTPException\NotFoundException();
        }
-       exit();
+       System::exit();
 }
 
 // when receiving an XML feed, always return OK
@@ -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();
        }