Don't subscribe to some state changes by bots.

This commit is contained in:
levlam 2024-02-19 00:23:46 +03:00
parent acef6e61a0
commit 5828e46046
2 changed files with 8 additions and 0 deletions

View File

@ -246,6 +246,10 @@ PollManager::PollManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::m
} }
void PollManager::start_up() { void PollManager::start_up() {
if (td_->auth_manager_->is_bot()) {
return;
}
class StateCallback final : public StateManager::Callback { class StateCallback final : public StateManager::Callback {
public: public:
explicit StateCallback(ActorId<PollManager> parent) : parent_(std::move(parent)) { explicit StateCallback(ActorId<PollManager> parent) : parent_(std::move(parent)) {

View File

@ -275,6 +275,10 @@ void UpdatesManager::tear_down() {
} }
void UpdatesManager::start_up() { void UpdatesManager::start_up() {
if (td_->auth_manager_->is_bot()) {
return;
}
class StateCallback final : public StateManager::Callback { class StateCallback final : public StateManager::Callback {
public: public:
explicit StateCallback(ActorId<UpdatesManager> parent) : parent_(std::move(parent)) { explicit StateCallback(ActorId<UpdatesManager> parent) : parent_(std::move(parent)) {