- if ($cmd == Delivery::MAIL) {
- $data = ActivityPub\Transmitter::createActivityFromMail($target_id);
- if (!empty($data)) {
- $success = HTTPSignature::transmit($data, $inbox, $uid);
- }
- } elseif ($cmd == Delivery::SUGGESTION) {
- $success = ActivityPub\Transmitter::sendContactSuggestion($uid, $inbox, $target_id);
- } elseif ($cmd == Delivery::RELOCATION) {
- // @todo Implementation pending
- } elseif ($cmd == Delivery::POKE) {
- // Implementation not planned
- } elseif ($cmd == Delivery::REMOVAL) {
- $success = ActivityPub\Transmitter::sendProfileDeletion($uid, $inbox);
- } elseif ($cmd == Delivery::PROFILEUPDATE) {
- $success = ActivityPub\Transmitter::sendProfileUpdate($uid, $inbox);
+ if (empty($uri_id)) {
+ $result = ActivityPub\Delivery::deliver($inbox);
+ $success = $result['success'];
+ $drop = false;
+ $uri_ids = $result['uri_ids'];