use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Model\User;
-use Friendica\Network\HTTPRequest;
use Friendica\Network\Probe;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
Logger::log("Fetch post from ".$source_url, Logger::DEBUG);
- $envelope = HTTPRequest::fetchUrl($source_url);
+ $envelope = DI::httpRequest()->fetch($source_url);
if ($envelope) {
Logger::log("Envelope was fetched.", Logger::DEBUG);
$x = self::verifyMagicEnvelope($envelope);
$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.
if (!intval(DI::config()->get("system", "diaspora_test"))) {
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
- $postResult = HTTPRequest::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");