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

This commit is contained in:
Alexander Yakovlev 2017-07-19 13:54:20 +07:00
parent c277b02273
commit 27cd7e69b1
1 changed files with 3 additions and 2 deletions

View File

@ -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));