Don't store invalid callback_data in messages.

This commit is contained in:
levlam 2021-06-03 19:26:19 +03:00
parent 7f9e9fd809
commit 6a7b2fd8a4

View File

@ -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);
}