]> git.mxchange.org Git - friendica.git/commitdiff
Only optical stuff
authorMichael Vogel <icarus@dabo.de>
Sun, 13 Dec 2015 23:42:36 +0000 (00:42 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 13 Dec 2015 23:42:36 +0000 (00:42 +0100)
include/ostatus.php
include/pubsubpublish.php

index d651fed12bb2c4cd27e556fd697fd2b0a0526dd7..e0e6c2186e308bd0325ff141f0e336cf571b0fde 100644 (file)
@@ -1080,30 +1080,30 @@ function ostatus_store_conversation($itemid, $conversation_url) {
 }
 
 function get_reshared_guid($item) {
-        $body = trim($item["body"]);
+       $body = trim($item["body"]);
 
-        // Skip if it isn't a pure repeated messages
-        // Does it start with a share?
-        if (strpos($body, "[share") > 0)
-                return("");
+       // Skip if it isn't a pure repeated messages
+       // Does it start with a share?
+       if (strpos($body, "[share") > 0)
+               return("");
 
-        // Does it end with a share?
-        if (strlen($body) > (strrpos($body, "[/share]") + 8))
-                return("");
+       // Does it end with a share?
+       if (strlen($body) > (strrpos($body, "[/share]") + 8))
+               return("");
 
-        $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body);
-        // Skip if there is no shared message in there
-        if ($body == $attributes)
-                return(false);
+       $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body);
+       // Skip if there is no shared message in there
+       if ($body == $attributes)
+               return(false);
 
-        $guid = "";
-        preg_match("/guid='(.*?)'/ism", $attributes, $matches);
-        if ($matches[1] != "")
-                $guid = $matches[1];
+       $guid = "";
+       preg_match("/guid='(.*?)'/ism", $attributes, $matches);
+       if ($matches[1] != "")
+               $guid = $matches[1];
 
-        preg_match('/guid="(.*?)"/ism', $attributes, $matches);
-        if ($matches[1] != "")
-                $guid = $matches[1];
+       preg_match('/guid="(.*?)"/ism', $attributes, $matches);
+       if ($matches[1] != "")
+               $guid = $matches[1];
 
        return $guid;
 }
@@ -1501,7 +1501,7 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false)
                        $mentioned[$thrparent[0]["author-link"]] = $thrparent[0]["author-link"];
                        $mentioned[$thrparent[0]["owner-link"]] = $thrparent[0]["owner-link"];
                }
-        }
+       }
 
        xml_add_element($doc, $entry, "link", "", array("rel" => "ostatus:conversation",
                                                        "href" => $a->get_baseurl()."/display/".$owner["nick"]."/".$item["parent"]));
@@ -1515,7 +1515,6 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false)
                                $mentioned[$t[1]] = $t[1];
 
        // Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
-       // Not sure if that will really work.
        $newmentions = array();
        foreach ($mentioned AS $mention) {
                $newmentions[str_replace("http://", "https://", $mention)] = str_replace("http://", "https://", $mention);
index 07972b7a8c4fc6570076c7b3f488f22543f48e46..0ac50aaaa76a44e94a4839ce977abbb0d0fc0293 100644 (file)
@@ -13,6 +13,9 @@ function handle_pubsubhubbub() {
        $r = q("SELECT * FROM `push_subscriber` WHERE `push` > 0");
 
        foreach($r as $rr) {
+
+               logger("Generate feed for user ".$rr['nickname']." - last updated ".$rr['last_update'], LOGGER_DEBUG);
+
                $params = ostatus_feed($a, $rr['nickname'], $rr['last_update']);
                $hmac_sig = hash_hmac("sha1", $params, $rr['secret']);