]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Relay.php
Fixed indenting
[friendica.git] / src / Protocol / Relay.php
index d98fda46d7620289bae4fe4eb1218b6b829689e3..8679bbec5bf1ee50f87fc8d49c1a5457d863ad9d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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]);
+               }       
+       }
 }