X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDelivery.php;h=8961b3f13d71d935f8947b05204117fe28a1993e;hb=f6faae5bb10299c81ab4ca2e94463246e47cacf7;hp=55a0cf96d012cd201f93542436de31c569201fb9;hpb=e3c7cd25e1339cf0f6342f6977a7dcdb8333b88e;p=friendica.git diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 55a0cf96d0..8961b3f13d 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -32,7 +32,6 @@ use Friendica\Protocol\Email; use Friendica\Protocol\Activity; use Friendica\Util\Network; use Friendica\Core\Worker; -use Friendica\Model\Conversation; use Friendica\Model\FContact; use Friendica\Model\Item; use Friendica\Protocol\Relay; @@ -210,7 +209,8 @@ class Delivery // Also transmit via Diaspora if this is a direct answer to a Diaspora comment. // This is done since the uri wouldn't match (Diaspora doesn't transmit it) // Also transmit relayed posts from Diaspora contacts via Diaspora. - if (!empty($parent) && !empty($thr_parent) && in_array(Protocol::DIASPORA, [$parent['network'], $thr_parent['network'], $target_item['network']])) { + if (($contact['network'] != Protocol::DIASPORA) && in_array(Protocol::DIASPORA, [$parent['network'] ?? '', $thr_parent['network'] ?? '', $target_item['network']])) { + Logger::info('Enforcing the Diaspora protocol', ['id' => $contact['id'], 'network' => $contact['network'], 'parent' => $parent['network'], 'thread-parent' => $thr_parent['network'], 'post' => $target_item['network']]); $contact['network'] = Protocol::DIASPORA; }