mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:10:11 +00:00
Centralized gsid generation
This commit is contained in:
parent
a77b7793a8
commit
e27915a819
3 changed files with 10 additions and 14 deletions
|
@ -1530,10 +1530,6 @@ class Contact
|
|||
|
||||
if (empty($data)) {
|
||||
$data = Probe::uri($url, "", $uid);
|
||||
// Ensure that there is a gserver entry
|
||||
if (!empty($data['baseurl']) && ($data['network'] != Protocol::PHANTOM)) {
|
||||
$data['gsid'] = GServer::getID($data['baseurl']);
|
||||
}
|
||||
}
|
||||
|
||||
// Take the default values when probing failed
|
||||
|
@ -2136,10 +2132,6 @@ class Contact
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($ret['baseurl']) && empty($contact['gsid'])) {
|
||||
$ret['gsid'] = GServer::getID($ret['baseurl']);
|
||||
}
|
||||
|
||||
$new_pubkey = $ret['pubkey'];
|
||||
|
||||
$update = false;
|
||||
|
@ -2308,10 +2300,6 @@ class Contact
|
|||
$ret = Probe::uri($url, $network, $uid, false);
|
||||
}
|
||||
|
||||
if (!empty($ret['baseurl'])) {
|
||||
$ret['gsid'] = GServer::getID($ret['baseurl']);
|
||||
}
|
||||
|
||||
if (($network != '') && ($ret['network'] != $network)) {
|
||||
Logger::log('Expected network ' . $network . ' does not match actual network ' . $ret['network']);
|
||||
return $result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue