Replaced “ …” with “ [continues…]” when announcement toot is too long
This commit is contained in:
parent
b35900dc63
commit
05c2c1da47
1 changed files with 2 additions and 2 deletions
|
@ -821,9 +821,9 @@ if ($opts['sendtoot'] && $instanswered && $idata['IsMastodon'] && $idata['FirstS
|
|||
$toot.=N.N.'Long description: ';
|
||||
(is_null($idata['LongDesc'])) ? $toot.='unspecified' : $toot.=html2text($idata['LongDesc']);
|
||||
if (postlen($toot)>$iniarr['botmaxchars']) {
|
||||
while (postlen($toot)+2>$iniarr['botmaxchars'])
|
||||
while (postlen($toot)+13>$iniarr['botmaxchars'])
|
||||
$toot=preg_replace('#\s+(\S|\n)+$#u','',$toot);
|
||||
$toot.=' …';
|
||||
$toot.=' [continues…]';
|
||||
}
|
||||
$context=[
|
||||
'http'=>[
|
||||
|
|
Loading…
Reference in a new issue