From 1b9722c65ac2169cadcf78376aaaf9d82721c9cd Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 17 Dec 2015 18:16:46 -0800 Subject: loop detection --- include/notifier.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/notifier.php') diff --git a/include/notifier.php b/include/notifier.php index 67e2472ef..50981df9d 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -378,9 +378,12 @@ function notifier_run($argv, $argc){ // if our parent is a tag_delivery recipient, uplink to the original author causing // a delivery fork. - if(intval($parent_item['item_uplink']) && (! $top_level_post) && ($cmd !== 'uplink')) { - logger('notifier: uplinking this item'); - proc_run('php','include/notifier.php','uplink',$item_id); + if(($parent_item) && intval($parent_item['item_uplink']) && (! $top_level_post) && ($cmd !== 'uplink')) { + // don't uplink a relayed post to the relay owner + if($parent_item['source_xchan'] !== $parent_item['owner_xchan']) { + logger('notifier: uplinking this item'); + proc_run('php','include/notifier.php','uplink',$item_id); + } } $private = false; -- cgit v1.2.3