urlencode notification message
This commit is contained in:
parent
9056414969
commit
2963fbf861
|
@ -61,7 +61,7 @@ function sendTelegramNotification($message)
|
||||||
$chats = $db->select("SELECT * FROM `".DB_PREFIX."_bot_telegram_notifications`");
|
$chats = $db->select("SELECT * FROM `".DB_PREFIX."_bot_telegram_notifications`");
|
||||||
if(!is_null($chats)) {
|
if(!is_null($chats)) {
|
||||||
foreach ($chats as $chat) {
|
foreach ($chats as $chat) {
|
||||||
if($chat['last_notification'] === $message) continue;
|
if(urldecode($chat['last_notification']) === $message) continue;
|
||||||
$chat = $chat['chat_id'];
|
$chat = $chat['chat_id'];
|
||||||
$Bot->sendMessage([
|
$Bot->sendMessage([
|
||||||
"chat_id" => $chat,
|
"chat_id" => $chat,
|
||||||
|
@ -69,7 +69,7 @@ function sendTelegramNotification($message)
|
||||||
]);
|
]);
|
||||||
$db->update(
|
$db->update(
|
||||||
DB_PREFIX."_bot_telegram_notifications",
|
DB_PREFIX."_bot_telegram_notifications",
|
||||||
["last_notification" => $message],
|
["last_notification" => urlencode($message)],
|
||||||
["chat_id" => $chat]
|
["chat_id" => $chat]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue