Merge pull request #329 from annando/1511-statusnet-contact
Needed changes for a changed core functionpull/330/head
commit
5270552a08
|
@ -357,12 +357,12 @@ function appnet_create_entities($a, $b, $postdata) {
|
|||
$start = $pos + 1;
|
||||
}
|
||||
|
||||
if (isset($postdata["url"]) AND isset($postdata["title"])) {
|
||||
if (isset($postdata["url"]) AND isset($postdata["title"]) AND ($postdata["type"] != "photo")) {
|
||||
$postdata["title"] = shortenmsg($postdata["title"], 90);
|
||||
$max = 256 - strlen($postdata["title"]);
|
||||
$text = shortenmsg($text, $max);
|
||||
$text .= "\n[".$postdata["title"]."](".$postdata["url"].")";
|
||||
} elseif (isset($postdata["url"])) {
|
||||
} elseif (isset($postdata["url"]) AND ($postdata["type"] != "photo")) {
|
||||
$postdata["url"] = short_link($postdata["url"]);
|
||||
$max = 240;
|
||||
$text = shortenmsg($text, $max);
|
||||
|
@ -524,7 +524,7 @@ function appnet_send(&$a,&$b) {
|
|||
"value" => $attached_data
|
||||
);
|
||||
|
||||
if (isset($post["url"]) AND !isset($post["title"])) {
|
||||
if (isset($post["url"]) AND !isset($post["title"]) AND ($post["type"] != "photo")) {
|
||||
$display_url = str_replace(array("http://www.", "https://www."), array("", ""), $post["url"]);
|
||||
$display_url = str_replace(array("http://", "https://"), array("", ""), $display_url);
|
||||
|
||||
|
|
|
@ -341,13 +341,13 @@ function buffer_send(&$a,&$b) {
|
|||
// Seems like a bug to me
|
||||
// Buffer doesn't add links to Twitter and App.net (but pictures)
|
||||
//if ($includedlinks AND isset($post["url"]))
|
||||
if (($profile->service == "twitter") AND isset($post["url"]))
|
||||
if (($profile->service == "twitter") AND isset($post["url"]) AND ($post["type"] != "photo"))
|
||||
$post["text"] .= " ".$post["url"];
|
||||
elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"])) {
|
||||
elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"]) AND ($post["type"] != "photo")) {
|
||||
$post["title"] = shortenmsg($post["title"], 90);
|
||||
$post["text"] = shortenmsg($post["text"], $limit - (24 + strlen($post["title"])));
|
||||
$post["text"] .= "\n[".$post["title"]."](".$post["url"].")";
|
||||
} elseif (($profile->service == "appdotnet") AND isset($post["url"]))
|
||||
} elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND ($post["type"] != "photo"))
|
||||
$post["text"] .= " ".$post["url"];
|
||||
elseif ($profile->service == "google")
|
||||
$post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon
|
||||
|
|
|
@ -581,7 +581,7 @@ function statusnet_post_hook(&$a,&$b) {
|
|||
|
||||
$image = "";
|
||||
|
||||
if (isset($msgarr["url"])) {
|
||||
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo")) {
|
||||
if ((strlen($msgarr["url"]) > 20) AND
|
||||
((strlen($msg." \n".$msgarr["url"]) > $max_char)))
|
||||
$msg .= " \n".short_link($msgarr["url"]);
|
||||
|
@ -738,7 +738,7 @@ function statusnet_prepare_body(&$a,&$b) {
|
|||
$msgarr = plaintext($a, $item, $max_char, true, 7);
|
||||
$msg = $msgarr["text"];
|
||||
|
||||
if (isset($msgarr["url"]))
|
||||
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo"))
|
||||
$msg .= " ".$msgarr["url"];
|
||||
|
||||
if (isset($msgarr["image"]))
|
||||
|
|
|
@ -475,7 +475,7 @@ function twitter_post_hook(&$a,&$b) {
|
|||
|
||||
$image = "";
|
||||
|
||||
if (isset($msgarr["url"]))
|
||||
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo"))
|
||||
$msg .= "\n".$msgarr["url"];
|
||||
elseif (isset($msgarr["image"]) AND ($msgarr["type"] != "video"))
|
||||
$image = $msgarr["image"];
|
||||
|
@ -707,7 +707,7 @@ function twitter_prepare_body(&$a,&$b) {
|
|||
$msgarr = plaintext($a, $item, $max_char, true, 8);
|
||||
$msg = $msgarr["text"];
|
||||
|
||||
if (isset($msgarr["url"]))
|
||||
if (isset($msgarr["url"]) AND ($msgarr["type"] != "photo"))
|
||||
$msg .= " ".$msgarr["url"];
|
||||
|
||||
if (isset($msgarr["image"]))
|
||||
|
|
Loading…
Reference in New Issue