summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkukin-konstantin <kukin.konstantin@gmail.com>2017-01-10 17:07:34 +0300
committerkukin-konstantin <kukin.konstantin@gmail.com>2017-01-10 17:07:34 +0300
commitf3aba5cb3cca0f99f2a39d61acd960a836295593 (patch)
treee265993fc4382aadb87eb1ecfd3baa48e4dfa72e /include
parent429dd74b583e0ac52d50142be493cba532ca017d (diff)
fix ReplyKeyboardMarkup
Diffstat (limited to 'include')
-rw-r--r--include/tgbot/types/KeyboardButton.h4
-rw-r--r--include/tgbot/types/ReplyKeyboardMarkup.h11
2 files changed, 8 insertions, 7 deletions
diff --git a/include/tgbot/types/KeyboardButton.h b/include/tgbot/types/KeyboardButton.h
index 637aced..204c579 100644
--- a/include/tgbot/types/KeyboardButton.h
+++ b/include/tgbot/types/KeyboardButton.h
@@ -31,12 +31,12 @@ public:
* Optional. If True, the user's phone number will be sent as a contact
* when the button is pressed. Available in private chats only
*/
- bool requestContact;
+ bool requestContact = false;
/**
* Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only.
*/
- bool requestLocation;
+ bool requestLocation = false;
};
}
diff --git a/include/tgbot/types/ReplyKeyboardMarkup.h b/include/tgbot/types/ReplyKeyboardMarkup.h
index 92d850e..f6e50db 100644
--- a/include/tgbot/types/ReplyKeyboardMarkup.h
+++ b/include/tgbot/types/ReplyKeyboardMarkup.h
@@ -28,6 +28,7 @@
#include <memory>
#include "tgbot/types/GenericReply.h"
+#include "tgbot/types/KeyboardButton.h"
namespace TgBot {
@@ -41,25 +42,25 @@ public:
typedef std::shared_ptr<ReplyKeyboardMarkup> Ptr;
/**
- * Array of button rows, each represented by an Array of Strings.
+ * Array of button rows, each represented by an Array of KeyboardButton.
*/
- std::vector<std::vector<std::string>> keyboard;
+ std::vector<std::vector<KeyboardButton::Ptr>> keyboard;
/**
* Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
*/
- bool resizeKeyboard;
+ bool resizeKeyboard = false;
/**
* Optional. Requests clients to hide the keyboard as soon as it's been used. Defaults to false.
*/
- bool oneTimeKeyboard;
+ bool oneTimeKeyboard = false;
/**
* Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
* Example: A user requests to change the bot‘s language, bot replies to the request with a keyboard to select the new language. Other users in the group don’t see the keyboard.
*/
- bool selective;
+ bool selective = false;
};
}