mirror of
https://gitlab.com/ifiction/ifhub-telegram.git
synced 2024-10-22 22:15:31 +00:00
put time as soon as we post updates
This commit is contained in:
parent
dc92a90150
commit
c277b02273
1 changed files with 6 additions and 3 deletions
9
bot.php
9
bot.php
|
@ -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());
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue