From 49c0e0de9ba81883ccde15cdb2b1dc4d28f25a0a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 19 Jul 2012 18:53:26 -0700 Subject: sync changes --- include/notifier.php | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'include/notifier.php') diff --git a/include/notifier.php b/include/notifier.php index f443c700a..d67f2dd3a 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -180,6 +180,8 @@ function notifier_run($argv, $argc){ $parent = $items[0]; + + // This is IMPORTANT!!!! // We will only send a "notify owner to relay" or followup message if the referenced post @@ -195,10 +197,9 @@ function notifier_run($argv, $argc){ // Other DFRN conversation members will be alerted during polled updates. - - $localhost = str_replace('www.','',$a->get_hostname()); - if(strpos($localhost,':')) - $localhost = substr($localhost,0,strpos($localhost,':')); + $relay_to_owner = false; + + $relay_origin_check = (((intval($target_item['origin'])) && (! intval($parent['origin']))) ? true : false); /** * @@ -208,28 +209,17 @@ function notifier_run($argv, $argc){ * */ - $relay_to_owner = false; - if((! $top_level) && ($parent['wall'] == 0) && (! $expire) && (stristr($target_item['uri'],$localhost))) { + if((! $top_level) && ($parent['wall'] == 0) && ($relay_origin_check) && (! $expire)) $relay_to_owner = true; - } - if(($cmd === 'uplink') && (intval($parent['forum_mode']) == 1) && (! $top_level)) { $relay_to_owner = true; } - // until the 'origin' flag has been in use for several months - // we will just use it as a fallback test - // later we will be able to use it as the primary test of whether or not to relay. - - if(! $target_item['origin']) + if(! $relay_origin_check) $relay_to_owner = false; - if($parent['origin']) - $relay_to_owner = false; - - if($relay_to_owner) { logger('notifier: followup', LOGGER_DEBUG); -- cgit v1.2.3