X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FProfileUpdate.php;h=ba15436d841c0ad189bcb6b6ead793d3e46f58ae;hb=60532ee7e4152af9997e0d7b69c7b35262d5528d;hp=899b42f455fa0107521a5185b15d82f2e810ec1e;hpb=af88c2daa34e39cb6430abf64d0648665bfeb9cd;p=friendica.git diff --git a/src/Worker/ProfileUpdate.php b/src/Worker/ProfileUpdate.php index 899b42f455..ba15436d84 100644 --- a/src/Worker/ProfileUpdate.php +++ b/src/Worker/ProfileUpdate.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Worker; @@ -12,6 +27,9 @@ use Friendica\DI; use Friendica\Protocol\Diaspora; use Friendica\Protocol\ActivityPub; +/** + * Send updated profile data to Diaspora and ActivityPub + */ class ProfileUpdate { public static function execute($uid = 0) { if (empty($uid)) { @@ -22,10 +40,10 @@ class ProfileUpdate { $inboxes = ActivityPub\Transmitter::fetchTargetInboxesforUser($uid); - foreach ($inboxes as $inbox) { - Logger::log('Profile update for user ' . $uid . ' to ' . $inbox .' via ActivityPub', Logger::DEBUG); - Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true], - 'APDelivery', Delivery::PROFILEUPDATE, '', $inbox, $uid); + foreach ($inboxes as $inbox => $receivers) { + Logger::info('Profile update for user ' . $uid . ' to ' . $inbox .' via ActivityPub'); + Worker::add(['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true], + 'APDelivery', Delivery::PROFILEUPDATE, 0, $inbox, $uid, $receivers); } Diaspora::sendProfile($uid);