From: Michael Vogel Date: Mon, 25 Aug 2014 21:38:13 +0000 (+0200) Subject: If a message is transmitted to a network that requires shortening (Twitter, Statusnet... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6aeaf0815f4c511bb5eefcd77443158fb332bcbb;p=friendica.git If a message is transmitted to a network that requires shortening (Twitter, Statusnet, ADN), then the shortened link will be the link to the friendica post if it was a shared post. --- diff --git a/include/plaintext.php b/include/plaintext.php index eb33d16e96..56f0c7873d 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -180,7 +180,8 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { if (!isset($post["url"])) { $limit = $limit - 23; $post["url"] = $b["plink"]; - } + } elseif (strpos($b["body"], "[share") !== false) + $post["url"] = $b["plink"]; $msg = shortenmsg($msg, $limit); }