From 6aeaf0815f4c511bb5eefcd77443158fb332bcbb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 25 Aug 2014 23:38:13 +0200 Subject: [PATCH] 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. --- include/plaintext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.5