diff options
author | YJBeetle <yjbeetle@gmail.com> | 2019-11-29 05:01:03 +0800 |
---|---|---|
committer | YJBeetle <yjbeetle@gmail.com> | 2019-11-29 05:01:03 +0800 |
commit | 2318c534d4286436a668c5a33220dfc8d5b85686 (patch) | |
tree | 4d95639486124e093c6795c0355969f64712a564 /src/TgTypeParser.cpp | |
parent | b3cc5149f8337a43fe7f5174e35c739cd5e6b229 (diff) |
fix: answerInlineQuery BUTTON_TYPE_INVALID error
https://core.telegram.org/bots/api#inlinekeyboardbutton
pay: NOTE: This type of button must always be the first button in the first row.
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r-- | src/TgTypeParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index 4e31c94..daa7b4b 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -1723,12 +1723,13 @@ std::string TgTypeParser::parseInlineKeyboardButton(const InlineKeyboardButton:: } string result; result += '{'; + if(object->pay) + appendToJson(result, "pay", object->pay); appendToJson(result, "text", object->text); appendToJson(result, "url", object->url); appendToJson(result, "callback_data", object->callbackData); appendToJson(result, "switch_inline_query", object->switchInlineQuery); appendToJson(result, "switch_inline_query_current_chat", object->switchInlineQueryCurrentChat); - appendToJson(result, "pay", object->pay); removeLastComma(result); result += '}'; return result; |