Logger::log("Fetching diaspora key for: ".$handle);
- $r = FContact::getByUrl($handle);
+ $r = FContact::getByURL($handle);
if ($r) {
return $r["pubkey"];
}
*/
public static function isSupportedByContactUrl($url, $update = null)
{
- return !empty(FContact::getByUrl($url, $update));
+ return !empty(FContact::getByURL($url, $update));
}
/**
$item = Item::selectFirst($fields, $condition);
if (!DBA::isResult($item)) {
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
$result = self::storeByGuid($guid, $person["url"], $uid);
// We don't have an url for items that arrived at the public dispatcher
if (DBA::isResult($item)) {
return $item["uri"];
} elseif (!$onlyfound) {
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
$parts = parse_url($person['url']);
unset($parts['path']);
continue;
}
- $person = FContact::getByUrl($match[3]);
+ $person = FContact::getByURL($match[3]);
if (empty($person)) {
continue;
}
return false;
}
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
if (!is_array($person)) {
Logger::log("unable to find author details");
return false;
$datarray["owner-link"] = $contact["url"];
$datarray["owner-id"] = Contact::getIdForURL($contact["url"], 0);
+ // Will be overwritten for sharing accounts in Item::insert
+ $datarray['post-type'] = ($datarray["uid"] == 0) ? Item::PT_GLOBAL : Item::PT_COMMENT;
+
$datarray["guid"] = $guid;
$datarray["uri"] = self::getUriFromGuid($author, $guid);
$datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]);
$body = Markdown::toBBCode($msg_text);
$message_uri = $msg_author.":".$msg_guid;
- $person = FContact::getByUrl($msg_author);
+ $person = FContact::getByURL($msg_author);
return Mail::insert([
'uid' => $importer['uid'],
return false;
}
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
if (!is_array($person)) {
Logger::log("unable to find author details");
return false;
$message_uri = $author.":".$guid;
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
if (!$person) {
Logger::log("unable to find author details");
return false;
return false;
}
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
if (!is_array($person)) {
Logger::log("Person not found: ".$author);
return false;
Logger::log("Author ".$author." wants to listen to us.", Logger::DEBUG);
}
- $ret = FContact::getByUrl($author);
+ $ret = FContact::getByURL($author);
if (!$ret || ($ret["network"] != Protocol::DIASPORA)) {
Logger::log("Cannot resolve diaspora handle ".$author." for ".$recipient);
$target_guid = Strings::escapeTags(XML::unescape($data->target_guid));
$target_type = Strings::escapeTags(XML::unescape($data->target_type));
- $person = FContact::getByUrl($author);
+ $person = FContact::getByURL($author);
if (!is_array($person)) {
Logger::log("unable to find author detail for ".$author);
return false;
$datarray["protocol"] = Conversation::PARCEL_DIASPORA;
$datarray["source"] = $xml;
+ if ($datarray["uid"] == 0) {
+ $datarray["post-type"] = Item::PT_GLOBAL;
+ }
+
$datarray["body"] = self::replacePeopleGuid($body, $contact["url"]);
self::storeMentions($datarray['uri-id'], $text);
// We always try to use the data from the fcontact table.
// This is important for transmitting data to Friendica servers.
if (!empty($contact['addr'])) {
- $fcontact = FContact::getByUrl($contact['addr']);
+ $fcontact = FContact::getByURL($contact['addr']);
if (!empty($fcontact)) {
$dest_url = ($public_batch ? $fcontact["batch"] : $fcontact["notify"]);
}