]> git.mxchange.org Git - friendica-addons.git/commitdiff
Support for simple shortening
authorMichael <heluecht@pirati.ca>
Mon, 12 Jul 2021 14:10:38 +0000 (14:10 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 12 Jul 2021 14:10:38 +0000 (14:10 +0000)
statusnet/statusnet.php
twitter/twitter.php

index bb51e24ba6287bc2822a032ea0d4f8076cd44b43..6f4c3e20da6d2d7bf74b863fe9e55f2c81cdaff1 100644 (file)
@@ -583,7 +583,7 @@ function statusnet_post_hook(App $a, &$b)
                $msg = $msgarr["text"];
 
                if (($msg == "") && isset($msgarr["title"]))
-                       $msg = Plaintext::shorten($msgarr["title"], $max_char - 50);
+                       $msg = Plaintext::shorten($msgarr["title"], $max_char - 50, $b['uid']);
 
                $image = "";
 
index e972d692bf5806cdb33c01d1c93c3de331999dea..8bc5940cf1ddd2d5b14ac4b4b741654c78156811 100644 (file)
@@ -674,7 +674,7 @@ function twitter_post_hook(App $a, array &$b)
                $msg = $msgarr["text"];
 
                if (($msg == "") && isset($msgarr["title"])) {
-                       $msg = Plaintext::shorten($msgarr["title"], $max_char - 50);
+                       $msg = Plaintext::shorten($msgarr["title"], $max_char - 50, $b['uid']);
                }
 
                // Add the link to the body if the type isn't a photo or there are more than 4 images in the post