We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b79e021 commit 69aca2cCopy full SHA for 69aca2c
src/UniversalTelegramBot.cpp
@@ -594,8 +594,11 @@ bool UniversalTelegramBot::sendMessageWithReplyKeyboard(
594
payload["parse_mode"] = parse_mode;
595
596
JsonObject replyMarkup = payload.createNestedObject("reply_markup");
597
-
598
- replyMarkup["keyboard"] = serialized(keyboard);
+
+ if (keyboard.isEmpty())
599
+ replyMarkup["remove_keyboard"] = true;
600
+ else
601
+ replyMarkup["keyboard"] = serialized(keyboard);
602
603
// Telegram defaults these values to false, so to decrease the size of the
604
// payload we will only send them if needed
0 commit comments