Only optical stuff
This commit is contained in:
parent
a1a7bce603
commit
bc8f753900
|
@ -1080,30 +1080,30 @@ function ostatus_store_conversation($itemid, $conversation_url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_reshared_guid($item) {
|
function get_reshared_guid($item) {
|
||||||
$body = trim($item["body"]);
|
$body = trim($item["body"]);
|
||||||
|
|
||||||
// Skip if it isn't a pure repeated messages
|
// Skip if it isn't a pure repeated messages
|
||||||
// Does it start with a share?
|
// Does it start with a share?
|
||||||
if (strpos($body, "[share") > 0)
|
if (strpos($body, "[share") > 0)
|
||||||
return("");
|
return("");
|
||||||
|
|
||||||
// Does it end with a share?
|
// Does it end with a share?
|
||||||
if (strlen($body) > (strrpos($body, "[/share]") + 8))
|
if (strlen($body) > (strrpos($body, "[/share]") + 8))
|
||||||
return("");
|
return("");
|
||||||
|
|
||||||
$attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body);
|
$attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","$1",$body);
|
||||||
// Skip if there is no shared message in there
|
// Skip if there is no shared message in there
|
||||||
if ($body == $attributes)
|
if ($body == $attributes)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
$guid = "";
|
$guid = "";
|
||||||
preg_match("/guid='(.*?)'/ism", $attributes, $matches);
|
preg_match("/guid='(.*?)'/ism", $attributes, $matches);
|
||||||
if ($matches[1] != "")
|
if ($matches[1] != "")
|
||||||
$guid = $matches[1];
|
$guid = $matches[1];
|
||||||
|
|
||||||
preg_match('/guid="(.*?)"/ism', $attributes, $matches);
|
preg_match('/guid="(.*?)"/ism', $attributes, $matches);
|
||||||
if ($matches[1] != "")
|
if ($matches[1] != "")
|
||||||
$guid = $matches[1];
|
$guid = $matches[1];
|
||||||
|
|
||||||
return $guid;
|
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]["author-link"]] = $thrparent[0]["author-link"];
|
||||||
$mentioned[$thrparent[0]["owner-link"]] = $thrparent[0]["owner-link"];
|
$mentioned[$thrparent[0]["owner-link"]] = $thrparent[0]["owner-link"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xml_add_element($doc, $entry, "link", "", array("rel" => "ostatus:conversation",
|
xml_add_element($doc, $entry, "link", "", array("rel" => "ostatus:conversation",
|
||||||
"href" => $a->get_baseurl()."/display/".$owner["nick"]."/".$item["parent"]));
|
"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];
|
$mentioned[$t[1]] = $t[1];
|
||||||
|
|
||||||
// Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
|
// Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
|
||||||
// Not sure if that will really work.
|
|
||||||
$newmentions = array();
|
$newmentions = array();
|
||||||
foreach ($mentioned AS $mention) {
|
foreach ($mentioned AS $mention) {
|
||||||
$newmentions[str_replace("http://", "https://", $mention)] = str_replace("http://", "https://", $mention);
|
$newmentions[str_replace("http://", "https://", $mention)] = str_replace("http://", "https://", $mention);
|
||||||
|
|
|
@ -13,6 +13,9 @@ function handle_pubsubhubbub() {
|
||||||
$r = q("SELECT * FROM `push_subscriber` WHERE `push` > 0");
|
$r = q("SELECT * FROM `push_subscriber` WHERE `push` > 0");
|
||||||
|
|
||||||
foreach($r as $rr) {
|
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']);
|
$params = ostatus_feed($a, $rr['nickname'], $rr['last_update']);
|
||||||
$hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
|
$hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue