X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FProbe.php;h=d35490d0d366f7e4ab2b91c10b957e56649345b6;hb=0ab5fed64cdd737817489434f0f008646a28a61d;hp=e74b4373454b4403ef0d275a6c047ce9b6de169f;hpb=5fd5819321f5b6bd62c0be4dbddedc4535b065fb;p=friendica.git diff --git a/src/Network/Probe.php b/src/Network/Probe.php index e74b437345..d35490d0d3 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -1,6 +1,6 @@ $uri]); return []; } @@ -2207,6 +2219,8 @@ class Probe $owner = User::getOwnerDataById($uid); $approfile = ActivityPub\Transmitter::getProfile($uid); + $split_name = Diaspora::splitName($owner['name']); + if (empty($owner['gsid'])) { $owner['gsid'] = GServer::getID($approfile['generator']['url']); } @@ -2226,7 +2240,28 @@ class Probe 'inbox' => $approfile['inbox'], 'outbox' => $approfile['outbox'], 'sharedinbox' => $approfile['endpoints']['sharedInbox'], 'network' => Protocol::DFRN, 'pubkey' => $owner['upubkey'], 'baseurl' => $approfile['generator']['url'], 'gsid' => $owner['gsid'], - 'manually-approve' => in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]) + 'manually-approve' => in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP]), + 'networks' => [ + Protocol::DIASPORA => [ + 'name' => $owner['name'], + 'given_name' => $split_name['first'], + 'family_name' => $split_name['last'], + 'nick' => $owner['nick'], + 'guid' => $approfile['diaspora:guid'], + 'url' => $owner['url'], + 'addr' => $owner['addr'], + 'alias' => $owner['alias'], + 'photo' => $owner['photo'], + 'photo_medium' => $owner['thumb'], + 'photo_small' => $owner['micro'], + 'batch' => $approfile['generator']['url'] . '/receive/public', + 'notify' => $owner['notify'], + 'poll' => $owner['poll'], + 'poco' => $owner['poco'], + 'network' => Protocol::DIASPORA, + 'pubkey' => $owner['upubkey'], + ] + ] ]; } catch (Exception $e) { // Default values for non existing targets