Don't subscribe to some state changes by bots.
This commit is contained in:
parent
acef6e61a0
commit
5828e46046
@ -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)) {
|
||||||
|
@ -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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user