From 27cd7e69b106ee11cec7c52dfa41dcf7a255bda8 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Wed, 19 Jul 2017 13:54:20 +0700 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D1=87=D0=B8=D1=81=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB=D0=B0?= =?UTF-8?q?=20Mastodon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.php b/bot.php index 01c5151..c743833 100644 --- a/bot.php +++ b/bot.php @@ -110,8 +110,9 @@ foreach ($articles as $article) { } if ($config['MASTODON'] === true) { $mastodon->domain($config['MASTODON_SERVER'])->token($config['MASTODON_ACCESS_TOKEN']); - $mdescription = "$title\n\n".ellipse($description, 400); - $mdescription .= ": $link"; + $limit = 500 - strlen($link) - strlen($title) - 20; + $mdescription = "$title\n\n".ellipse($description, $limit); + $mdescription .= "\n$link"; /* if ($image) { download('https://ifhub.club'.$image, './'.basename($image));