]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Merge pull request #8945 from annando/asynchronous-relation
[friendica.git] / src / Protocol / Diaspora.php
index c9da351f75f7745153da69650856dc1ee30b17cb..f3b95db68f2fb1c5756cb494e73b96b51b121de5 100644 (file)
@@ -22,6 +22,7 @@
 namespace Friendica\Protocol;
 
 use Friendica\Content\Feature;
+use Friendica\Content\PageInfo;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\Markdown;
 use Friendica\Core\Cache\Duration;
@@ -1378,7 +1379,7 @@ class Diaspora
 
                Logger::log("Fetch post from ".$source_url, Logger::DEBUG);
 
-               $envelope = Network::fetchUrl($source_url);
+               $envelope = DI::httpRequest()->fetch($source_url);
                if ($envelope) {
                        Logger::log("Envelope was fetched.", Logger::DEBUG);
                        $x = self::verifyMagicEnvelope($envelope);
@@ -2409,7 +2410,7 @@ class Diaspora
                        $image_url = "http://".$handle_parts[1].$image_url;
                }
 
-               Contact::updateAvatar($image_url, $importer["uid"], $contact["id"]);
+               Contact::updateAvatar($contact["id"], $image_url);
 
                // Generic birthday. We don't know the timezone. The year is irrelevant.
 
@@ -2621,7 +2622,7 @@ class Diaspora
                                $item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]);
 
                                // Add OEmbed and other information to the body
-                               $item["body"] = add_page_info_to_body($item["body"], false, true);
+                               $item["body"] = PageInfo::searchAndAppendToBody($item["body"], false, true);
 
                                return $item;
                        } else {
@@ -2985,7 +2986,7 @@ class Diaspora
 
                        // Add OEmbed and other information to the body
                        if (!self::isHubzilla($contact["url"])) {
-                               $body = add_page_info_to_body($body, false, true);
+                               $body = PageInfo::searchAndAppendToBody($body, false, true);
                        }
                }
 
@@ -3259,7 +3260,7 @@ class Diaspora
                if (!intval(DI::config()->get("system", "diaspora_test"))) {
                        $content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
 
-                       $postResult = Network::post($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
+                       $postResult = DI::httpRequest()->post($dest_url . "/", $envelope, ["Content-Type: " . $content_type]);
                        $return_code = $postResult->getReturnCode();
                } else {
                        Logger::log("test_mode");