]> git.mxchange.org Git - friendica.git/blobdiff - mod/salmon.php
Merge pull request #10479 from MrPetovan/task/9378-merge-share-template
[friendica.git] / mod / salmon.php
index bc4410434bbf362c14eee893fca773ade3bb0d70..1e92980f1ceb123a2ef362e97581fc780be7e816 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,6 +25,8 @@ use Friendica\Core\Protocol;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
+use Friendica\Model\GServer;
+use Friendica\Model\Post;
 use Friendica\Protocol\ActivityNamespace;
 use Friendica\Protocol\OStatus;
 use Friendica\Protocol\Salmon;
@@ -185,6 +187,10 @@ function salmon_post(App $a, $xml = '') {
                }
        }
 
+       if (!empty($r[0]['gsid'])) {
+               GServer::setProtocol($r[0]['gsid'], Post\DeliveryData::OSTATUS);
+       }
+
        // Have we ignored the person?
        // If so we can not accept this post.