mirror of
https://github.com/tdlib/telegram-bot-api
synced 2025-08-30 22:05:37 +00:00
Don't store invalid callback_data in messages.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user