]> git.mxchange.org Git - friendica.git/blobdiff - include/notifier.php
bbcode: Don't use a preview picture in the "attachment" element if it is a video...
[friendica.git] / include / notifier.php
index ea2f5e75c457b3f8e54d99718fc8462621d1f284..d222fd9426d5506ab88d3d01ee8c38fd0a0c40d8 100644 (file)
@@ -696,6 +696,7 @@ function notifier_run(&$argv, &$argc){
                                        // Do not send to ostatus if we are not configured to send to public networks
                                        if($owner['prvnets'])
                                                break;
+
                                        if(get_config('system','ostatus_disabled') || get_config('system','dfrn_only'))
                                                break;
 
@@ -707,8 +708,7 @@ function notifier_run(&$argv, &$argc){
                                                        // queue message for redelivery
                                                        add_to_queue($contact['id'],NETWORK_OSTATUS,$slap);
                                                }
-                                       }
-                                       else {
+                                       } else {
 
                                                // only send salmon if public - e.g. if it's ok to notify
                                                // a public hub, it's ok to send a salmon
@@ -786,10 +786,6 @@ function notifier_run(&$argv, &$argc){
                                                //if($reply_to)
                                                //      $headers .= 'Reply-to: ' . $reply_to . "\n";
 
-                                               // for testing purposes: Collect exported mails
-                                               //$file = tempnam("/tmp/friendica/", "mail-out2-");
-                                               //file_put_contents($file, json_encode($it));
-
                                                $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n";
 
                                                if($it['uri'] !== $it['parent-uri']) {
@@ -847,7 +843,7 @@ function notifier_run(&$argv, &$argc){
 
                                        if(! $contact['pubkey'])
                                                break;
-                                       
+
                                        if($target_item['verb'] === ACTIVITY_DISLIKE) {
                                                // unsupported
                                                break;
@@ -906,14 +902,14 @@ function notifier_run(&$argv, &$argc){
 
        if($public_message) {
 
-               $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s' 
+               $r1 = q("SELECT DISTINCT(`batch`), `id`, `name`,`network` FROM `contact` WHERE `network` = '%s'
                        AND `uid` = %d AND `rel` != %d group by `batch` ORDER BY rand() ",
                        dbesc(NETWORK_DIASPORA),
                        intval($owner['uid']),
                        intval(CONTACT_IS_SHARING)
                );
-                       
-               $r2 = q("SELECT `id`, `name`,`network` FROM `contact` 
+
+               $r2 = q("SELECT `id`, `name`,`network` FROM `contact`
                        WHERE `network` in ( '%s', '%s')  AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0
                        AND `rel` != %d order by rand() ",
                        dbesc(NETWORK_DFRN),