Ensure that local contacts always are DFRN contacts

This commit is contained in:
Michael 2020-01-16 06:43:21 +00:00
parent 7db4c7ea02
commit ccc7a71e54
5 changed files with 52 additions and 9 deletions

View file

@ -401,6 +401,11 @@ class Probe
$data['network'] = Protocol::PHANTOM;
}
// Ensure that local connections always are DFRN
if (($network == '') && ($data['network'] != Protocol::PHANTOM) && (self::ownHost($data['baseurl'] ?? '') || self::ownHost($data['url']))) {
$data['network'] = Protocol::DFRN;
}
if (!isset($data['hide']) && in_array($data['network'], Protocol::FEDERATED)) {
$data['hide'] = self::getHideStatus($data['url']);
}