Skip to content

Commit 84e93a1

Browse files
authored
Merge pull request #338 from Makcal/patch-1
fix: do not send `"pay": false` in InlineKeyboardButton
2 parents 1b10d2f + c788449 commit 84e93a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TgTypeParser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,8 @@ std::string TgTypeParser::parseInlineKeyboardButton(const InlineKeyboardButton::
20462046
appendToJson(result, "switch_inline_query_current_chat", object->switchInlineQueryCurrentChat);
20472047
appendToJson(result, "switch_inline_query_chosen_chat", parseSwitchInlineQueryChosenChat(object->switchInlineQueryChosenChat));
20482048
appendToJson(result, "callback_game", parseCallbackGame(object->callbackGame));
2049-
appendToJson(result, "pay", object->pay);
2049+
if (object->pay)
2050+
appendToJson(result, "pay", object->pay);
20502051
removeLastComma(result);
20512052
result += '}';
20522053
return result;

0 commit comments

Comments
 (0)