]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
Merge remote-tracking branch 'upstream/2021.06-rc' into http-input-data
[friendica.git] / mod / pubsub.php
index cbf678a93f8cc7de4c08f815bf9cb8fb9cdae205..fe5bb3c0b61e1b2575bec54a036722136a930069 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -25,11 +25,11 @@ use Friendica\Core\Protocol;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
-use Friendica\Protocol\Feed;
 use Friendica\Protocol\OStatus;
 use Friendica\Util\Strings;
 use Friendica\Util\Network;
-use Friendica\Core\System;
+use Friendica\Model\GServer;
+use Friendica\Model\Post;
 
 function hub_return($valid, $body)
 {
@@ -134,6 +134,10 @@ function pubsub_post(App $a)
                }
        }
 
+       if (!empty($contact['gsid'])) {
+               GServer::setProtocol($contact['gsid'], Post\DeliveryData::OSTATUS);
+       }
+
        if (!in_array($contact['rel'], [Contact::SHARING, Contact::FRIEND]) && ($contact['network'] != Protocol::FEED)) {
                Logger::log('Contact ' . $contact['id'] . ' is not expected to share with us - ignored.');
                hub_post_return();