aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/Game.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2018-01-30 20:06:54 +0300
committerlevlam <levlam@telegram.org>2018-01-30 20:06:54 +0300
commitd7ecc96113aa73445102b6a51b8f740517a0ab47 (patch)
tree9eb1cf764e2a548d5263aaf3b24f9c4588d6c2c5 /td/telegram/Game.cpp
parentd6102462c24e8dcfacc4757516ab3bbd33b2bdc4 (diff)
Update layer to 75. Support entities in captions.
GitOrigin-RevId: a633d5d57c52794da0fc1b6de04f4ff1a4ed00fd
Diffstat (limited to 'td/telegram/Game.cpp')
-rw-r--r--td/telegram/Game.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/td/telegram/Game.cpp b/td/telegram/Game.cpp
index 6de5d8d3c..000b4575d 100644
--- a/td/telegram/Game.cpp
+++ b/td/telegram/Game.cpp
@@ -83,14 +83,13 @@ UserId Game::get_bot_user_id() const {
return bot_user_id_;
}
-void Game::set_message_text(string text, vector<MessageEntity> &&entities) {
+void Game::set_message_text(FormattedText &&text) {
text_ = std::move(text);
- entities_ = std::move(entities);
}
tl_object_ptr<td_api::game> Game::get_game_object(const Td *td) const {
return make_tl_object<td_api::game>(
- id_, short_name_, title_, text_, get_text_entities_object(entities_), description_,
+ id_, short_name_, title_, get_formatted_text_object(text_), description_,
get_photo_object(td->file_manager_.get(), &photo_),
td->animations_manager_->get_animation_object(animation_file_id_, "get_game_object"));
}
@@ -105,8 +104,7 @@ tl_object_ptr<telegram_api::inputMediaGame> Game::get_input_media_game(const Td
bool operator==(const Game &lhs, const Game &rhs) {
return lhs.id_ == rhs.id_ && lhs.access_hash_ == rhs.access_hash_ && lhs.bot_user_id_ == rhs.bot_user_id_ &&
lhs.short_name_ == rhs.short_name_ && lhs.title_ == rhs.title_ && lhs.description_ == rhs.description_ &&
- lhs.photo_ == rhs.photo_ && lhs.animation_file_id_ == rhs.animation_file_id_ && lhs.text_ == rhs.text_ &&
- lhs.entities_ == rhs.entities_;
+ lhs.photo_ == rhs.photo_ && lhs.animation_file_id_ == rhs.animation_file_id_ && lhs.text_ == rhs.text_;
}
bool operator!=(const Game &lhs, const Game &rhs) {