X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FAPDelivery.php;h=3c2eba8d8f6bd8cf2072ceccbf29f26c51254cf0;hb=cbfc3d0c28e0b55c3ccf1ddfd321798a8c2532e8;hp=f43c56a3ecb6d95eff9507ceb2bbf4f9dc80d464;hpb=11310f4cf0eb66206ba758e178a892345028bf15;p=friendica.git diff --git a/src/Worker/APDelivery.php b/src/Worker/APDelivery.php index f43c56a3ec..3c2eba8d8f 100644 --- a/src/Worker/APDelivery.php +++ b/src/Worker/APDelivery.php @@ -11,17 +11,22 @@ use Friendica\Util\HTTPSignature; class APDelivery extends BaseObject { - public static function execute($cmd, $item_id, $inbox) + public static function execute($cmd, $item_id, $inbox, $uid) { logger('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $inbox, LOGGER_DEBUG); if ($cmd == Delivery::MAIL) { } elseif ($cmd == Delivery::SUGGESTION) { } elseif ($cmd == Delivery::RELOCATION) { + } elseif ($cmd == Delivery::REMOVAL) { + ActivityPub\Transmitter::sendProfileDeletion($uid, $inbox); + } elseif ($cmd == Delivery::PROFILEUPDATE) { + ActivityPub\Transmitter::sendProfileUpdate($uid, $inbox); } else { - $item = Item::selectFirst(['uid'], ['id' => $item_id]); - $data = ActivityPub::createActivityFromItem($item_id); - HTTPSignature::transmit($data, $inbox, $item['uid']); + $data = ActivityPub\Transmitter::createActivityFromItem($item_id); + if (!empty($data)) { + HTTPSignature::transmit($data, $inbox, $uid); + } } return;