]> git.mxchange.org Git - friendica.git/commitdiff
Added some explanation, beautified code
authorMichael <heluecht@pirati.ca>
Thu, 26 Apr 2018 21:16:16 +0000 (21:16 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 26 Apr 2018 21:16:16 +0000 (21:16 +0000)
src/Worker/Delivery.php
src/Worker/PubSubPublish.php

index 4387f28b79d40855504f6354084fe0c72f00fdc7..1361857df7222405546cb408c693469d3bb38f33 100644 (file)
@@ -204,12 +204,12 @@ class Delivery {
                                        $msgitems[] = $item;
                                }
                        }
-                       $atom = DFRN::entries($msgitems,$owner);
+                       $atom = DFRN::entries($msgitems, $owner);
                }
 
                logger('Notifier entry: ' . $contact["url"] . ' ' . $target_item["guid"] . ' entry: ' . $atom, LOGGER_DATA);
 
-               $basepath =  implode('/', array_slice(explode('/',$contact['url']),0,3));
+               $basepath =  implode('/', array_slice(explode('/', $contact['url']), 0, 3));
 
                // perform local delivery if we are on the same site
 
@@ -248,6 +248,8 @@ class Delivery {
                        return;
                }
 
+               // We don't have a relationship with contacts on a public post.
+               // Se we transmit with the new method and via Diaspora as a fallback
                if ($items[0]['uid'] == 0) {
                        $deliver_status = DFRN::transmit($owner, $contact, $atom);
                        if ($deliver_status < 200) {
@@ -400,7 +402,7 @@ class Delivery {
                                        }
                                }
                        }
-                       if (strncasecmp($subject,  'RE:', 3)) {
+                       if (strncasecmp($subject, 'RE:', 3)) {
                                $subject = 'Re: ' . $subject;
                        }
                }
index de26eab9c14cee66e9219466c9a5eb42ee2e18f3..bd4aa0390b953b1b952d648254314aee8409730d 100644 (file)
@@ -68,7 +68,7 @@ class PubSubPublish {
                                        $rr['topic']),
                                "X-Hub-Signature: sha1=".$hmac_sig];
 
-               logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG);
+               logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DATA);
 
                Network::post($rr['callback_url'], $params, $headers);
                $ret = $a->get_curl_code();