Merge pull request #13893 from annando/fix-relay-unsubscribe

Fixed relay detection on unsubscription
This commit is contained in:
Hypolite Petovan 2024-02-12 23:55:01 -05:00 committed by GitHub
commit 262ca4131d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -104,12 +104,17 @@ HELP;
$actor = $this->getArgument(1);
$apcontact = APContact::getByURL($actor);
if (empty($apcontact) || !in_array($apcontact['type'], ['Application', 'Service'])) {
$this->out($actor . ' is no relay actor');
if (empty($apcontact)) {
$this->out($actor . ' wasn\'t found');
return 1;
}
if ($mode == 'add') {
if (!APContact::isRelay($apcontact)) {
$this->out($actor . ' is no relay actor');
return 1;
}
if (Transmitter::sendRelayFollow($actor)) {
$this->out('Successfully added ' . $actor);
} else {