]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Merge pull request #11519 from MrPetovan/task/11511-console-domain-move
[friendica.git] / src / Protocol / Diaspora.php
index 9f7781d13de19eba1e6730f0a73a3cbde2916918..70fd0f1f8d9acb06f8d66d6bb21f922c7fa7a140 100644 (file)
@@ -41,6 +41,7 @@ use Friendica\Model\Mail;
 use Friendica\Model\Post;
 use Friendica\Model\Tag;
 use Friendica\Model\User;
+use Friendica\Network\HTTPClient\Client\HttpClientAccept;
 use Friendica\Network\Probe;
 use Friendica\Util\Crypto;
 use Friendica\Util\DateTimeFormat;
@@ -1059,7 +1060,7 @@ class Diaspora
 
                Logger::info("Fetch post from ".$source_url);
 
-               $envelope = DI::httpClient()->fetch($source_url);
+               $envelope = DI::httpClient()->fetch($source_url, HttpClientAccept::MAGIC);
                if ($envelope) {
                        Logger::info("Envelope was fetched.");
                        $x = self::verifyMagicEnvelope($envelope);
@@ -4100,10 +4101,10 @@ class Diaspora
                        'author-id'  => $author,
                        'owner-id'   => $author,
                        'body'       => $post,
-                       'allow_cid'  => $owner['allow_cid'],
-                       'allow_gid'  => $owner['allow_gid'],
-                       'deny_cid'   => $owner['deny_cid'],
-                       'deny_gid'   => $owner['deny_gid'],
+                       'allow_cid'  => $owner['allow_cid'] ?? '',
+                       'allow_gid'  => $owner['allow_gid']?? '',
+                       'deny_cid'   => $owner['deny_cid'] ?? '',
+                       'deny_gid'   => $owner['deny_gid'] ?? '',
                ];
 
                if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) {