Resubscribe to relay servers

This commit is contained in:
Michael 2022-05-24 07:02:42 +00:00
parent a1871756ee
commit b1a2de5cb5
3 changed files with 72 additions and 3 deletions

View file

@ -341,4 +341,15 @@ class Relay
// It should never happen that we arrive here
return [];
}
/**
* Resubscribe to all relay servers
*/
public static function reSubscribe()
{
foreach (self::getList() as $server) {
$success = ActivityPub\Transmitter::sendRelayFollow($server['url']);
Logger::debug('Resubscribed', ['profile' => $server['url'], 'success' => $success]);
}
}
}