]> git.mxchange.org Git - friendica.git/blob - src/Worker/DiscoverPoCo.php
"CheckServer" added
[friendica.git] / src / Worker / DiscoverPoCo.php
1 <?php
2 /**
3  * @file src/Worker/DiscoverPoCo.php
4  */
5 namespace Friendica\Worker;
6
7 use Friendica\Core\Config;
8 use Friendica\Core\Logger;
9 use Friendica\Model\GContact;
10 use Friendica\Protocol\PortableContact;
11
12 class DiscoverPoCo
13 {
14         public static function execute()
15         {
16                 if (Config::get('system', 'poco_discovery') == PortableContact::DISABLED) {
17                         return;
18                 }
19
20                 // Query Friendica and Hubzilla servers for their users
21                 PortableContact::discover();
22
23                 // Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server)
24                 if (!Config::get('system', 'ostatus_disabled')) {
25                         GContact::discoverGsUsers();
26                 }
27         }
28 }