mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 17:03:16 +00:00
Merge pull request #193 from annando/master
Buffer: Improvement for posts to app.net.
This commit is contained in:
commit
4d060c48a1
1 changed files with 3 additions and 8 deletions
|
@ -342,17 +342,12 @@ function buffer_send(&$a,&$b) {
|
|||
if (($profile->service == "twitter") AND isset($post["url"]))
|
||||
$post["text"] .= " ".$post["url"];
|
||||
elseif (($profile->service == "appdotnet") AND isset($post["url"]) AND isset($post["title"])) {
|
||||
$maxdesclength = $limit - (strlen($post["text"]) + 1);
|
||||
if (strlen($post["title"]) > $maxdesclength)
|
||||
$posttitle = trim(substr($post["title"], 0, $maxdesclength - 3))."...";
|
||||
else
|
||||
$posttitle = trim($post["title"]);
|
||||
|
||||
$post["text"] .= "\n[".$posttitle."](".$post["url"].")";
|
||||
$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"]))
|
||||
$post["text"] .= " ".$post["url"];
|
||||
|
||||
|
||||
$message = array();
|
||||
$message["text"] = $post["text"];
|
||||
$message["profile_ids[]"] = $profile->id;
|
||||
|
|
Loading…
Reference in a new issue