Twitter client prints tweet length

This commit is contained in:
Steffen Lange 2020-04-24 19:38:06 +02:00
parent 55c5b2e24a
commit 3049b58e14

View file

@ -34,7 +34,10 @@ for ($i = 0; $i < $db->count(); $i++) {
$s = $patch->getVendor() . ' released #' . $patch->getProduct();
if (!empty($patch->getBranch()))
$s .= ' ' . $patch->getBranch();
$s .= ' version ' . $patch->getVersion() . '. ' . $patch->getURL();
$s .= ' version ' . $patch->getVersion() . '.';
$len = strlen($s) + 24; // + space + wrapped URL
$s .= ' ' . $patch->getURL();
echo $patch->getId() . ': ' . $len . PHP_EOL;
try {
$twitter->send($s);
} catch (DG\Twitter\Exception $e) {