]> git.mxchange.org Git - friendica.git/blob - src/Worker/APDelivery.php
943238a7b41ecdc90e6328f2e32ae1a40673c3a7
[friendica.git] / src / Worker / APDelivery.php
1 <?php
2 /**
3  * @file src/Worker/APDelivery.php
4  */
5 namespace Friendica\Worker;
6
7 use Friendica\BaseObject;
8 use Friendica\Protocol\ActivityPub;
9 use Friendica\Model\Item;
10 use Friendica\Util\HTTPSignature;
11
12 class APDelivery extends BaseObject
13 {
14         public static function execute($cmd, $item_id, $inbox, $uid)
15         {
16                 logger('Invoked: ' . $cmd . ': ' . $item_id . ' to ' . $inbox, LOGGER_DEBUG);
17
18                 if ($cmd == Delivery::MAIL) {
19                 } elseif ($cmd == Delivery::SUGGESTION) {
20                 } elseif ($cmd == Delivery::RELOCATION) {
21                 } else {
22                         $data = ActivityPub::createActivityFromItem($item_id);
23                         if (!empty($data)) {
24                                 HTTPSignature::transmit($data, $inbox, $uid);
25                         }
26                 }
27
28                 return;
29         }
30 }