1
0
Fork 0
mirror of https://gitlab.com/ifiction/ifhub-telegram.git synced 2024-04-26 22:29:34 +03:00

put time as soon as we post updates

This commit is contained in:
Alexander Yakovlev 2017-07-19 13:46:31 +07:00
parent dc92a90150
commit c277b02273

View file

@ -101,6 +101,9 @@ foreach ($articles as $article) {
'parse_mode' => 'Markdown'
]);
unset($tdescription);
if (!$config['DRY_RUN']) {
file_put_contents('.lastrun', time());
}
} catch (Longman\TelegramBot\Exception\TelegramException $e) {
echo $e;
}
@ -120,12 +123,12 @@ foreach ($articles as $article) {
$mdescription .= $attachment->url;
}*/
$mastodon->status_post($mdescription);
if (!$config['DRY_RUN']) {
file_put_contents('.lastrun', time());
}
}
} else {
echo $description."\n";
echo $link;
}
}
if (!$config['DRY_RUN']) {
file_put_contents('.lastrun', time());
}