X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FActivityPub%2FTransmitter.php;h=a3b8b679e3b9d0350fe6704880a49ea43992ab23;hb=f0849b0a93870ea38d69938270927f3160e8c6fb;hp=cafdfc77248d3dd45427ce737c0abfca7b0f666a;hpb=2ba411611899c41a6d4909ea3c37979d911da97f;p=friendica.git diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index cafdfc7724..a3b8b679e3 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -1474,6 +1474,10 @@ class Transmitter public static function sendActivity($activity, $target, $uid, $id = '') { $profile = APContact::getByURL($target); + if (empty($profile['inbox'])) { + Logger::warning('No inbox found for target', ['target' => $target, 'profile' => $profile]); + return; + } $owner = User::getOwnerDataById($uid); @@ -1510,6 +1514,10 @@ class Transmitter public static function sendFollowObject($object, $target, $uid = 0) { $profile = APContact::getByURL($target); + if (empty($profile['inbox'])) { + Logger::warning('No inbox found for target', ['target' => $target, 'profile' => $profile]); + return; + } if (empty($uid)) { // Fetch the list of administrators @@ -1556,6 +1564,10 @@ class Transmitter public static function sendContactAccept($target, $id, $uid) { $profile = APContact::getByURL($target); + if (empty($profile['inbox'])) { + Logger::warning('No inbox found for target', ['target' => $target, 'profile' => $profile]); + return; + } $owner = User::getOwnerDataById($uid); $data = ['@context' => ActivityPub::CONTEXT, @@ -1589,6 +1601,10 @@ class Transmitter public static function sendContactReject($target, $id, $uid) { $profile = APContact::getByURL($target); + if (empty($profile['inbox'])) { + Logger::warning('No inbox found for target', ['target' => $target, 'profile' => $profile]); + return; + } $owner = User::getOwnerDataById($uid); $data = ['@context' => ActivityPub::CONTEXT, @@ -1622,6 +1638,10 @@ class Transmitter public static function sendContactUndo($target, $cid, $uid) { $profile = APContact::getByURL($target); + if (empty($profile['inbox'])) { + Logger::warning('No inbox found for target', ['target' => $target, 'profile' => $profile]); + return; + } $object_id = self::activityIDFromContact($cid); if (empty($object_id)) {