Skip to content

Commit

Permalink
Merge pull request #190 from tindy2013/master
Browse files Browse the repository at this point in the history
Add is_automatic_forward property to Message object
  • Loading branch information
reo7sp authored Dec 8, 2021
2 parents 6b38783 + 075d2a5 commit f74c381
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/tgbot/types/Message.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ class Message {
* @brief Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
*/
InlineKeyboardMarkup::Ptr replyMarkup;

/**
* @brief Optional. Message is automatically forwarded from bounded channel.
*/
bool automaticForward = false;
};

}
Expand Down
1 change: 1 addition & 0 deletions src/TgTypeParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Message::Ptr TgTypeParser::parseJsonAndGetMessage(const ptree& data) const {
result->successfulPayment = tryParseJson<SuccessfulPayment>(&TgTypeParser::parseJsonAndGetSuccessfulPayment, data, "successful_payment");
result->connectedWebsite = data.get("connected_website", "");
result->replyMarkup = tryParseJson<InlineKeyboardMarkup>(&TgTypeParser::parseJsonAndGetInlineKeyboardMarkup, data, "reply_markup");
result->automaticForward = data.get("is_automatic_forward", false);
return result;
}

Expand Down

0 comments on commit f74c381

Please sign in to comment.