Do not iniitalize stickers manager before authorization.
GitOrigin-RevId: 497a09aeb0c7f8cadb00902d1ceeceaa144c0885
This commit is contained in:
parent
6225237cb9
commit
b343e148e8
@ -20,6 +20,7 @@
|
|||||||
#include "td/telegram/net/NetQueryDispatcher.h"
|
#include "td/telegram/net/NetQueryDispatcher.h"
|
||||||
#include "td/telegram/NotificationManager.h"
|
#include "td/telegram/NotificationManager.h"
|
||||||
#include "td/telegram/PasswordManager.h"
|
#include "td/telegram/PasswordManager.h"
|
||||||
|
#include "td/telegram/StickersManager.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
#include "td/telegram/TdDb.h"
|
#include "td/telegram/TdDb.h"
|
||||||
#include "td/telegram/TopDialogManager.h"
|
#include "td/telegram/TopDialogManager.h"
|
||||||
@ -727,6 +728,7 @@ void AuthManager::on_get_authorization(tl_object_ptr<telegram_api::auth_Authoriz
|
|||||||
G()->shared_config().set_option_integer("session_count", auth->tmp_sessions_);
|
G()->shared_config().set_option_integer("session_count", auth->tmp_sessions_);
|
||||||
}
|
}
|
||||||
td->notification_manager_->init();
|
td->notification_manager_->init();
|
||||||
|
td->stickers_manager_->init();
|
||||||
send_closure(td->top_dialog_manager_, &TopDialogManager::do_start_up);
|
send_closure(td->top_dialog_manager_, &TopDialogManager::do_start_up);
|
||||||
td->updates_manager_->get_difference("on_get_authorization");
|
td->updates_manager_->get_difference("on_get_authorization");
|
||||||
td->on_online_updated(false, true);
|
td->on_online_updated(false, true);
|
||||||
|
@ -1111,6 +1111,14 @@ StickersManager::StickersManager(Td *td, ActorShared<> parent) : td_(td), parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
void StickersManager::start_up() {
|
void StickersManager::start_up() {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StickersManager::init() {
|
||||||
|
if (!td_->auth_manager_->is_authorized() || td_->auth_manager_->is_bot() || G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// add animated emoji sticker set
|
// add animated emoji sticker set
|
||||||
special_sticker_sets_[SpecialStickerSetType::AnimatedEmoji].type_ = "animated_emoji_sticker_set";
|
special_sticker_sets_[SpecialStickerSetType::AnimatedEmoji].type_ = "animated_emoji_sticker_set";
|
||||||
special_sticker_sets_[SpecialStickerSetType::AnimatedDice].type_ = "animated_dice_sticker_set";
|
special_sticker_sets_[SpecialStickerSetType::AnimatedDice].type_ = "animated_dice_sticker_set";
|
||||||
|
@ -44,6 +44,8 @@ class StickersManager : public Actor {
|
|||||||
|
|
||||||
StickersManager(Td *td, ActorShared<> parent);
|
StickersManager(Td *td, ActorShared<> parent);
|
||||||
|
|
||||||
|
void init();
|
||||||
|
|
||||||
tl_object_ptr<td_api::sticker> get_sticker_object(FileId file_id) const;
|
tl_object_ptr<td_api::sticker> get_sticker_object(FileId file_id) const;
|
||||||
|
|
||||||
tl_object_ptr<td_api::stickers> get_stickers_object(const vector<FileId> &sticker_ids) const;
|
tl_object_ptr<td_api::stickers> get_stickers_object(const vector<FileId> &sticker_ids) const;
|
||||||
|
Reference in New Issue
Block a user