$delivery_contacts_stmt = null;
$target_item = [];
+ $parent = [];
+ $thr_parent = [];
$items = [];
$delivery_queue_count = 0;
*/
private static function skipDFRN($contact, $item, $parent, $thr_parent, $cmd)
{
+ if (empty($parent['network'])) {
+ return false;
+ }
+
// Don't skip when the starting post is delivered via Diaspora
if ($parent['network'] == Protocol::DIASPORA) {
return false;
return false;
}
+ // We deliver reshares via AP whenever possible
+ if (ActivityPub\Transmitter::isAnnounce($item)) {
+ return true;
+ }
+
// Skip DFRN when the item will be (forcefully) delivered via AP
if (Config::get('debug', 'total_ap_delivery') && ($contact['network'] == Protocol::DFRN) && !empty(APContact::getByURL($contact['url'], false))) {
return true;