Renamed functions

This commit is contained in:
Michael 2018-10-03 15:41:51 +00:00
parent 1fe55679fc
commit 8841519c0d
6 changed files with 17 additions and 17 deletions

View File

@ -337,7 +337,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
);
} 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;
@ -394,7 +394,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
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

View File

@ -557,10 +557,10 @@ class Contact extends BaseObject
} 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']);
}
}
}
@ -1769,7 +1769,7 @@ class Contact extends BaseObject
$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);
}
}
@ -1846,7 +1846,7 @@ class Contact extends BaseObject
}
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?

View File

@ -1,6 +1,6 @@
<?php
/**
* @file src/Protocol/ActivityPub.php
* @file src/Protocol/ActivityPub/Processor.php
*/
namespace Friendica\Protocol\ActivityPub;

View File

@ -1,6 +1,6 @@
<?php
/**
* @file src/Protocol/ActivityPub.php
* @file src/Protocol/ActivityPub/Receiver.php
*/
namespace Friendica\Protocol\ActivityPub;

View File

@ -687,7 +687,7 @@ class Transmitter
* @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']);
@ -713,7 +713,7 @@ class Transmitter
* @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']);
@ -740,7 +740,7 @@ class Transmitter
* @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);
@ -766,7 +766,7 @@ class Transmitter
* @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);
@ -793,7 +793,7 @@ class Transmitter
* @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);
@ -819,7 +819,7 @@ class Transmitter
* @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);

View File

@ -19,9 +19,9 @@ class APDelivery extends BaseObject
} 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)) {