From c7e05005296aebb84e144b7bcd0ed14ac3652e2d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 13 Feb 2024 04:30:38 +0000 Subject: [PATCH] Fixed relay detection on unsubscription --- src/Console/Relay.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Console/Relay.php b/src/Console/Relay.php index 2ed95a1e7e..ba983a0490 100644 --- a/src/Console/Relay.php +++ b/src/Console/Relay.php @@ -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 {