mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-30 16:02:56 +01:00
Don't store invalid callback_data in messages.
This commit is contained in:
parent
7f9e9fd809
commit
6a7b2fd8a4
@ -1500,7 +1500,7 @@ class Client::JsonInlineKeyboardButton : public Jsonable {
|
||||
case td_api::inlineKeyboardButtonTypeCallbackWithPassword::ID: {
|
||||
auto data = get_callback_data(button_->type_);
|
||||
if (!td::check_utf8(data)) {
|
||||
object("callback_data", td::JsonRawString(data));
|
||||
object("callback_data", "INVALID");
|
||||
} else {
|
||||
object("callback_data", data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user