3 * @file src/Worker/APDelivery.php
5 namespace Friendica\Worker;
7 use Friendica\BaseObject;
8 use Friendica\Protocol\ActivityPub;
9 use Friendica\Model\Item;
10 use Friendica\Util\HTTPSignature;
12 class APDelivery extends BaseObject
14 public static function execute($cmd, $item_id, $inbox)
16 logger('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $inbox, LOGGER_DEBUG);
18 if ($cmd == Delivery::MAIL) {
19 } elseif ($cmd == Delivery::SUGGESTION) {
20 } elseif ($cmd == Delivery::RELOCATION) {
22 $item = Item::selectFirst(['uid'], ['id' => $item_id]);
23 $data = ActivityPub::createActivityFromItem($item_id);
24 HTTPSignature::transmit($data, $inbox, $item['uid']);