mirror of
https://github.com/friendica/friendica
synced 2025-04-28 11:04:22 +02:00
Improved server detection
This commit is contained in:
parent
98954dd14e
commit
cc75eb5d18
9 changed files with 660 additions and 342 deletions
|
@ -91,8 +91,8 @@ HELP;
|
|||
|
||||
if ((count($this->args) == 1) && ($this->getArgument(0) == 'list')) {
|
||||
$contacts = $this->dba->select('apcontact', ['url'],
|
||||
["`type` = ? AND `url` IN (SELECT `url` FROM `contact` WHERE `uid` = ? AND `rel` = ?)",
|
||||
'Application', 0, Contact::FRIEND]);
|
||||
["`type` IN (?, ?) AND `url` IN (SELECT `url` FROM `contact` WHERE `uid` = ? AND `rel` = ?)",
|
||||
'Application', 'Service', 0, Contact::FRIEND]);
|
||||
while ($contact = $this->dba->fetch($contacts)) {
|
||||
$this->out($contact['url']);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ HELP;
|
|||
$actor = $this->getArgument(1);
|
||||
|
||||
$apcontact = APContact::getByURL($actor);
|
||||
if (empty($apcontact) || ($apcontact['type'] != 'Application')) {
|
||||
if (empty($apcontact) || !in_array($apcontact['type'], ['Application', 'Service'])) {
|
||||
$this->out($actor . ' is no relay actor');
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue