diff --git a/update_chain.php b/update_chain.php index c7bb2a1..f809e9b 100644 --- a/update_chain.php +++ b/update_chain.php @@ -165,6 +165,9 @@ if ($saved_chain != $chain_string) { fwrite($file2, $contents); fclose($file2); } +elseif ($argv[1] == "send") { + send_text("The pinned message is already the latest."); +} $conn->close(); diff --git a/webhook.php b/webhook.php index bd64df2..6f2fcc9 100644 --- a/webhook.php +++ b/webhook.php @@ -74,7 +74,7 @@ function member_exit() { function update() { send_html("Update started. New chain will only be send if the chain has changed. Please wait as this takes about a minute."); - exec('echo php ' . __DIR__ . '/update_chain.php | at now'); + exec('echo php ' . __DIR__ . '/update_chain.php send | at now'); } // Get JSON from post, store it and decode it.