mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:10:16 +00:00
Don't perform a delivery to failing servers
This commit is contained in:
parent
86a486f62b
commit
feb74b4d9a
2 changed files with 15 additions and 5 deletions
|
@ -177,9 +177,13 @@ class GServer
|
|||
public static function reachable(string $profile, string $server = '', string $network = '', bool $force = false): bool
|
||||
{
|
||||
if ($server == '') {
|
||||
$contact = Contact::getByURL($profile, null, ['baseurl']);
|
||||
$contact = Contact::getByURL($profile, null, ['baseurl', 'network']);
|
||||
if (!empty($contact['baseurl'])) {
|
||||
$server = $contact['baseurl'];
|
||||
} elseif ($contact['network'] == Protocol::DIASPORA) {
|
||||
$parts = parse_url($profile);
|
||||
unset($parts['path']);
|
||||
$server = (string)Uri::fromParts($parts);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue