Fixed relay detection on unsubscription
This commit is contained in:
parent
686d0b6dbb
commit
c7e0500529
1 changed files with 7 additions and 2 deletions
|
@ -104,12 +104,17 @@ HELP;
|
||||||
$actor = $this->getArgument(1);
|
$actor = $this->getArgument(1);
|
||||||
|
|
||||||
$apcontact = APContact::getByURL($actor);
|
$apcontact = APContact::getByURL($actor);
|
||||||
if (empty($apcontact) || !in_array($apcontact['type'], ['Application', 'Service'])) {
|
if (empty($apcontact)) {
|
||||||
$this->out($actor . ' is no relay actor');
|
$this->out($actor . ' wasn\'t found');
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'add') {
|
if ($mode == 'add') {
|
||||||
|
if (!APContact::isRelay($apcontact)) {
|
||||||
|
$this->out($actor . ' is no relay actor');
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (Transmitter::sendRelayFollow($actor)) {
|
if (Transmitter::sendRelayFollow($actor)) {
|
||||||
$this->out('Successfully added ' . $actor);
|
$this->out('Successfully added ' . $actor);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue