1
0
Fork 0
mirror of https://gitlab.com/ifiction/ifhub-telegram.git synced 2024-05-19 17:38:48 +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' 'parse_mode' => 'Markdown'
]); ]);
unset($tdescription); unset($tdescription);
if (!$config['DRY_RUN']) {
file_put_contents('.lastrun', time());
}
} catch (Longman\TelegramBot\Exception\TelegramException $e) { } catch (Longman\TelegramBot\Exception\TelegramException $e) {
echo $e; echo $e;
} }
@ -120,12 +123,12 @@ foreach ($articles as $article) {
$mdescription .= $attachment->url; $mdescription .= $attachment->url;
}*/ }*/
$mastodon->status_post($mdescription); $mastodon->status_post($mdescription);
if (!$config['DRY_RUN']) {
file_put_contents('.lastrun', time());
}
} }
} else { } else {
echo $description."\n"; echo $description."\n";
echo $link; echo $link;
} }
} }
if (!$config['DRY_RUN']) {
file_put_contents('.lastrun', time());
}