1
0
Fork 0
mirror of https://gitlab.com/ifiction/ifhub-telegram.git synced 2024-05-01 08:39:38 +03:00

Вычисление предела Mastodon

This commit is contained in:
Alexander Yakovlev 2017-07-19 13:54:20 +07:00
parent c277b02273
commit 27cd7e69b1

View file

@ -110,8 +110,9 @@ foreach ($articles as $article) {
} }
if ($config['MASTODON'] === true) { if ($config['MASTODON'] === true) {
$mastodon->domain($config['MASTODON_SERVER'])->token($config['MASTODON_ACCESS_TOKEN']); $mastodon->domain($config['MASTODON_SERVER'])->token($config['MASTODON_ACCESS_TOKEN']);
$mdescription = "$title\n\n".ellipse($description, 400); $limit = 500 - strlen($link) - strlen($title) - 20;
$mdescription .= ": $link"; $mdescription = "$title\n\n".ellipse($description, $limit);
$mdescription .= "\n$link";
/* /*
if ($image) { if ($image) {
download('https://ifhub.club'.$image, './'.basename($image)); download('https://ifhub.club'.$image, './'.basename($image));