]> git.mxchange.org Git - friendica.git/blobdiff - include/notifier.php
contact edit updates
[friendica.git] / include / notifier.php
index 61274bedf04b1935788dff6876cca93a7d94c974..a4fe9b71e083c33ac0ab64bfb77a8db15d2a5bd8 100644 (file)
@@ -206,7 +206,7 @@ function notifier_run($argv, $argc){
 
                /**
                 *
-                * Be VERY CAREFUL if you make any changes to the following lines. Seemingly innocuous changes 
+                * Be VERY CAREFUL if you make any changes to the following several lines. Seemingly innocuous changes 
                 * have been known to cause runaway conditions which affected several servers, along with 
                 * permissions issues. 
                 *
@@ -218,6 +218,17 @@ function notifier_run($argv, $argc){
                        $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'])
+                       $relay_to_owner = false;
+
+               if($parent['origin'])
+                       $relay_to_owner = false;
+
+
 
                if($relay_to_owner) {
                        logger('notifier: followup', LOGGER_DEBUG);
@@ -710,7 +721,7 @@ function notifier_run($argv, $argc){
        if($public_message) {
 
                $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s' 
-                       AND `uid` = %d AND `rel` != %d ORDER BY rand() ",
+                       AND `uid` = %d AND `rel` != %d group by `batch` ORDER BY rand() ",
                        dbesc(NETWORK_DIASPORA),
                        intval($owner['uid']),
                        intval(CONTACT_IS_SHARING)