$contact['network'] = Protocol::OSTATUS;
}
- // All new contacts are hidden by default
- if (!isset($contact['hide'])) {
- $contact['hide'] = true;
- }
-
// Remove unwanted parts from the contact url (e.g. '?zrl=...')
if (in_array($contact['network'], Protocol::FEDERATED)) {
$contact['url'] = self::cleanContactUrl($contact['url']);
$contact['location'] = $contact['location'] ?? '';
$contact['about'] = $contact['about'] ?? '';
$contact['generation'] = $contact['generation'] ?? 0;
+ $contact['hide'] = $contact['hide'] ?? true;
$fields = ['name' => $contact['name'], 'nick' => $contact['nick'] ?? '', 'addr' => $contact['addr'] ?? '', 'network' => $contact['network'],
'url' => $contact['url'], 'nurl' => Strings::normaliseLink($contact['url']), 'photo' => $contact['photo'],
$newdata = [];
foreach ($fields as $field) {
if (isset($data[$field])) {
- $newdata[$field] = $data[$field];
+ if (in_array($field, ["gsid", "hide", "account-type"])) {
+ $newdata[$field] = (int)$data[$field];
+ } else {
+ $newdata[$field] = $data[$field];
+ }
} elseif ($field != "gsid") {
$newdata[$field] = "";
} else {
// When the previous detection process had got a time out
// we could falsely detect a Friendica profile as AP profile.
if (!self::$istimeout) {
- $ap_profile = ActivityPub::probeProfile($uri);
+ $ap_profile = ActivityPub::probeProfile($uri, !$cache);
if (empty($data) || (!empty($ap_profile) && empty($network) && (($data['network'] ?? '') != Protocol::DFRN))) {
$data = $ap_profile;