);
} else {
if ($network == Protocol::ACTIVITYPUB) {
- ActivityPub\Transmitter::transmitContactAccept($contact['url'], $contact['hub-verify'], $uid);
+ ActivityPub\Transmitter::sendContactAccept($contact['url'], $contact['hub-verify'], $uid);
$pending = true;
} else {
$pending = false;
Group::addMember(User::getDefaultGroup($uid, $contact["network"]), $contact['id']);
if ($network == Protocol::ACTIVITYPUB && $duplex) {
- ActivityPub\Transmitter::transmitActivity('Follow', $contact['url'], $uid);
+ ActivityPub\Transmitter::sendActivity('Follow', $contact['url'], $uid);
}
// Let's send our user to the contact editor in case they want to
} elseif ($contact['network'] == Protocol::DIASPORA) {
Diaspora::sendUnshare($user, $contact);
} elseif ($contact['network'] == Protocol::ACTIVITYPUB) {
- ActivityPub\Transmitter::transmitContactUndo($contact['url'], $user['uid']);
+ ActivityPub\Transmitter::sendContactUndo($contact['url'], $user['uid']);
if ($dissolve) {
- ActivityPub\Transmitter::transmitContactReject($contact['url'], $contact['hub-verify'], $user['uid']);
+ ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $user['uid']);
}
}
}
$ret = Diaspora::sendShare($a->user, $contact);
logger('share returns: ' . $ret);
} elseif ($contact['network'] == Protocol::ACTIVITYPUB) {
- $ret = ActivityPub\Transmitter::transmitActivity('Follow', $contact['url'], $uid);
+ $ret = ActivityPub\Transmitter::sendActivity('Follow', $contact['url'], $uid);
logger('Follow returns: ' . $ret);
}
}
}
if ($contact['network'] == Protocol::ACTIVITYPUB) {
- ActivityPub\Transmitter::transmitContactAccept($contact['url'], $contact['hub-verify'], $importer['uid']);
+ ActivityPub\Transmitter::sendContactAccept($contact['url'], $contact['hub-verify'], $importer['uid']);
}
// send email notification to owner?
<?php
/**
- * @file src/Protocol/ActivityPub.php
+ * @file src/Protocol/ActivityPub/Processor.php
*/
namespace Friendica\Protocol\ActivityPub;
foreach ($attachments as $attach) {
$filetype = strtolower(substr($attach['mediaType'], 0, strpos($attach['mediaType'], '/')));
if ($filetype == 'image') {
- $item['body'] .= "\n[img]".$attach['url'].'[/img]';
+ $item['body'] .= "\n[img]" . $attach['url'] . '[/img]';
} else {
if (!empty($item["attach"])) {
$item["attach"] .= ',';
<?php
/**
- * @file src/Protocol/ActivityPub.php
+ * @file src/Protocol/ActivityPub/Receiver.php
*/
namespace Friendica\Protocol\ActivityPub;
* @param integer $uid User ID
* @param string $inbox Target inbox
*/
- public static function transmitProfileDeletion($uid, $inbox)
+ public static function sendProfileDeletion($uid, $inbox)
{
$owner = User::getOwnerDataById($uid);
$profile = APContact::getByURL($owner['url']);
* @param integer $uid User ID
* @param string $inbox Target inbox
*/
- public static function transmitProfileUpdate($uid, $inbox)
+ public static function sendProfileUpdate($uid, $inbox)
{
$owner = User::getOwnerDataById($uid);
$profile = APContact::getByURL($owner['url']);
* @param string $target Target profile
* @param integer $uid User ID
*/
- public static function transmitActivity($activity, $target, $uid)
+ public static function sendActivity($activity, $target, $uid)
{
$profile = APContact::getByURL($target);
* @param $id
* @param integer $uid User ID
*/
- public static function transmitContactAccept($target, $id, $uid)
+ public static function sendContactAccept($target, $id, $uid)
{
$profile = APContact::getByURL($target);
* @param $id
* @param integer $uid User ID
*/
- public static function transmitContactReject($target, $id, $uid)
+ public static function sendContactReject($target, $id, $uid)
{
$profile = APContact::getByURL($target);
* @param string $target Target profile
* @param integer $uid User ID
*/
- public static function transmitContactUndo($target, $uid)
+ public static function sendContactUndo($target, $uid)
{
$profile = APContact::getByURL($target);
} elseif ($cmd == Delivery::SUGGESTION) {
} elseif ($cmd == Delivery::RELOCATION) {
} elseif ($cmd == Delivery::REMOVAL) {
- ActivityPub\Transmitter::transmitProfileDeletion($uid, $inbox);
+ ActivityPub\Transmitter::sendProfileDeletion($uid, $inbox);
} elseif ($cmd == Delivery::PROFILEUPDATE) {
- ActivityPub\Transmitter::transmitProfileUpdate($uid, $inbox);
+ ActivityPub\Transmitter::sendProfileUpdate($uid, $inbox);
} else {
$data = ActivityPub\Transmitter::createActivityFromItem($item_id);
if (!empty($data)) {