diff options
| author | levlam <levlam@telegram.org> | 2024-04-02 03:52:34 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2024-04-02 03:52:34 +0300 |
| commit | 03a624903e1d5a116d4342265f775139119e5fad (patch) | |
| tree | 5c1946338a8879430883290ad81bcf83099afcd2 /td/telegram/Game.cpp | |
| parent | 6010475d26ca023f8e3d96033654ea45d1d3f697 (diff) | |
Move relevant functions to UserManager.
Diffstat (limited to 'td/telegram/Game.cpp')
| -rw-r--r-- | td/telegram/Game.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/td/telegram/Game.cpp b/td/telegram/Game.cpp index c275b54c8..9150a992d 100644 --- a/td/telegram/Game.cpp +++ b/td/telegram/Game.cpp @@ -7,13 +7,13 @@ #include "td/telegram/Game.h" #include "td/telegram/AnimationsManager.h" -#include "td/telegram/ContactsManager.h" #include "td/telegram/Document.h" #include "td/telegram/DocumentsManager.h" #include "td/telegram/misc.h" #include "td/telegram/Photo.h" #include "td/telegram/Td.h" #include "td/telegram/telegram_api.h" +#include "td/telegram/UserManager.h" #include "td/utils/common.h" #include "td/utils/logging.h" @@ -91,7 +91,7 @@ bool Game::has_input_media() const { } tl_object_ptr<telegram_api::inputMediaGame> Game::get_input_media_game(const Td *td) const { - auto input_user = td->contacts_manager_->get_input_user_force(bot_user_id_); + auto input_user = td->user_manager_->get_input_user_force(bot_user_id_); return make_tl_object<telegram_api::inputMediaGame>( make_tl_object<telegram_api::inputGameShortName>(std::move(input_user), short_name_)); } @@ -113,14 +113,14 @@ StringBuilder &operator<<(StringBuilder &string_builder, const Game &game) { << ", photo = " << game.photo_ << ", animation_file_id = " << game.animation_file_id_ << "]"; } -Result<Game> process_input_message_game(const ContactsManager *contacts_manager, +Result<Game> process_input_message_game(const UserManager *user_manager, tl_object_ptr<td_api::InputMessageContent> &&input_message_content) { CHECK(input_message_content != nullptr); CHECK(input_message_content->get_id() == td_api::inputMessageGame::ID); auto input_message_game = move_tl_object_as<td_api::inputMessageGame>(input_message_content); UserId bot_user_id(input_message_game->bot_user_id_); - TRY_STATUS(contacts_manager->get_input_user(bot_user_id)); + TRY_STATUS(user_manager->get_input_user(bot_user_id)); if (!clean_input_string(input_message_game->game_short_name_)) { return Status::Error(400, "Game short name must be encoded in UTF-8"); |
