You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/tgbot/types/LinkPreviewOptions.h
+6-5
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
4
4
#include<memory>
5
5
#include<string>
6
+
#include<boost/optional.hpp>
6
7
7
8
namespaceTgBot {
8
9
@@ -19,29 +20,29 @@ class LinkPreviewOptions {
19
20
/**
20
21
* @brief Optional. True, if the link preview is disabled
21
22
*/
22
-
bool isDisabled;
23
+
boost::optional<bool> isDisabled;
23
24
24
25
/**
25
26
* @brief Optional. URL to use for the link preview.
26
27
*
27
28
* If empty, then the first URL found in the message text will be used
28
29
*/
29
-
std::string url;
30
+
boost::optional<std::string> url;
30
31
31
32
/**
32
33
* @brief Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
33
34
*/
34
-
bool preferSmallMedia;
35
+
boost::optional<bool> preferSmallMedia;
35
36
36
37
/**
37
38
* @brief Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview
38
39
*/
39
-
bool preferLargeMedia;
40
+
boost::optional<bool> preferLargeMedia;
40
41
41
42
/**
42
43
* @brief Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text
Copy file name to clipboardExpand all lines: include/tgbot/types/ReplyParameters.h
+7-6
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
#include<memory>
8
8
#include<string>
9
9
#include<vector>
10
+
#include<boost/optional.hpp>
10
11
11
12
namespaceTgBot {
12
13
@@ -30,42 +31,42 @@ class ReplyParameters {
30
31
*
31
32
* Not supported for messages sent on behalf of a business account.
32
33
*/
33
-
std::int64_t chatId;
34
+
boost::optional<std::int64_t> chatId;
34
35
35
36
/**
36
37
* @brief Optional. Pass True if the message should be sent even if the specified message to be replied to is not found.
37
38
*
38
39
* Always False for replies in another chat or forum topic.
39
40
* Always True for messages sent on behalf of a business account.
40
41
*/
41
-
bool allowSendingWithoutReply;
42
+
boost::optional<bool> allowSendingWithoutReply;
42
43
43
44
/**
44
45
* @brief Optional. Quoted part of the message to be replied to; 0-1024 characters after entities parsing.
45
46
*
46
47
* The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and customEmoji entities.
47
48
* The message will fail to send if the quote isn't found in the original message.
48
49
*/
49
-
std::string quote;
50
+
boost::optional<std::string> quote;
50
51
51
52
/**
52
53
* @brief Optional. Mode for parsing entities in the quote.
53
54
*
54
55
* See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details.
55
56
*/
56
-
std::string quoteParseMode;
57
+
boost::optional<std::string> quoteParseMode;
57
58
58
59
/**
59
60
* @brief Optional. A JSON-serialized list of special entities that appear in the quote.
0 commit comments