diff options
author | friendica <info@friendica.com> | 2012-07-19 18:53:26 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-19 18:53:26 -0700 |
commit | 49c0e0de9ba81883ccde15cdb2b1dc4d28f25a0a (patch) | |
tree | a355b82d15ca85a944083823ddc5f252b2e424cc /include/notifier.php | |
parent | 6402fa11703b094426ed99f53f04ad8e9fbbbf90 (diff) | |
download | volse-hubzilla-49c0e0de9ba81883ccde15cdb2b1dc4d28f25a0a.tar.gz volse-hubzilla-49c0e0de9ba81883ccde15cdb2b1dc4d28f25a0a.tar.bz2 volse-hubzilla-49c0e0de9ba81883ccde15cdb2b1dc4d28f25a0a.zip |
sync changes
Diffstat (limited to 'include/notifier.php')
-rw-r--r-- | include/notifier.php | 24 |
1 files changed, 7 insertions, 17 deletions
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); |