unset($parts['path']);
$host_url = Network::unparseURL($parts);
- return $host_url . '/object/' . $guid;
+ return $host_url . '/objects/' . $guid;
}
return "";
$datarray["contact-id"] = $author_contact["cid"];
$datarray["network"] = $author_contact["network"];
- $datarray["author-link"] = $person["url"];
- $datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
-
- $datarray["owner-link"] = $contact["url"];
- $datarray["owner-id"] = Contact::getIdForURL($contact["url"], 0);
+ $datarray["owner-link"] = $datarray["author-link"] = $person["url"];
+ $datarray["owner-id"] = $datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
$datarray["guid"] = $guid;
$datarray["uri"] = self::getUriFromGuid($author, $guid);
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
Network::post($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
- $return_code = $a->get_curl_code();
+ $return_code = Network::getCurl()->getCode();
} else {
logger("test_mode");
return 200;
logger("transmit: ".$logid."-".$guid." to ".$dest_url." returns: ".$return_code);
- if (!$return_code || (($return_code == 503) && (stristr($a->get_curl_headers(), "retry-after")))) {
+ if (!$return_code || (($return_code == 503) && (stristr(Network::getCurl()->getHeaders(), "retry-after")))) {
if (!$no_queue && !empty($contact['contact-type']) && ($contact['contact-type'] != Contact::ACCOUNT_TYPE_RELAY)) {
logger("queue message");
// queue message for redelivery
$author = self::myHandle($owner);
$message = ["author" => $author,
- "guid" => System::UUID(),
+ "guid" => System::createUUID(),
"parent_type" => "Post",
"parent_guid" => $item["guid"]];