diff --git a/td/telegram/ReplyMarkup.cpp b/td/telegram/ReplyMarkup.cpp index de220d0a5..c5d186e0c 100644 --- a/td/telegram/ReplyMarkup.cpp +++ b/td/telegram/ReplyMarkup.cpp @@ -618,6 +618,9 @@ static Result get_inline_keyboard_button(tl_object_ptrallow_channel_chats_) { current_button.id |= InlineKeyboardButton::BROADCASTS_MASK; } + if (current_button.id == 0) { + return Status::Error(400, "At least one chat type must be allowed"); + } if (current_button.id == InlineKeyboardButton::FULL_MASK) { current_button.id = 0; }