$delivery_contacts_stmt = null;
$target_item = [];
+ $parent = [];
+ $thr_parent = [];
$items = [];
$delivery_queue_count = 0;
/** @var ACLFormatter $aclFormatter */
$aclFormatter = BaseObject::getClass(ACLFormatter::class);
- $allow_people = $aclFormatter->expand($parent['allow_cid'] ?? '');
- $allow_groups = Group::expand($uid, $aclFormatter->expand($parent['allow_gid'] ?? ''),true);
- $deny_people = $aclFormatter->expand($parent['deny_cid'] ?? '');
- $deny_groups = Group::expand($uid, $aclFormatter->expand($parent['deny_gid'] ?? ''));
+ $allow_people = $aclFormatter->expand($parent['allow_cid']);
+ $allow_groups = Group::expand($uid, $aclFormatter->expand($parent['allow_gid']),true);
+ $deny_people = $aclFormatter->expand($parent['deny_cid']);
+ $deny_groups = Group::expand($uid, $aclFormatter->expand($parent['deny_gid']));
// if our parent is a public forum (forum_mode == 1), uplink to the origional author causing
// a delivery fork. private groups (forum_mode == 2) do not uplink
*/
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;