- Logger::info('Discover AP followings', ['url' => $url, 'contacts' => count($followings)]);
- foreach ($followings as $following) {
- if (DBA::exists('gcontact', ['nurl' => Strings::normaliseLink(($following))])) {
- continue;
+ if (!empty($followings)) {
+ Logger::info('Discover AP followings', ['url' => $url, 'contacts' => count($followings)]);
+ foreach ($followings as $following) {
+ if (DBA::exists('gcontact', ['nurl' => Strings::normaliseLink(($following))])) {
+ continue;
+ }
+ Logger::info('Discover new AP contact', ['url' => $following]);
+ Worker::add(PRIORITY_LOW, 'UpdateGContact', $following);