From 4abb995b0523cbc57a887963ef6036dd741e9225 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 8 Apr 2021 15:51:29 +0300 Subject: [PATCH] Don't use online mode for bots having more than one session. --- td/telegram/Td.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index d2a98f9ff..4f9f1c3bf 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -3187,6 +3187,10 @@ bool Td::is_online() const { } void Td::set_is_bot_online(bool is_bot_online) { + if (G()->shared_config().get_option_integer("session_count") > 1) { + is_bot_online = false; + } + if (is_bot_online == is_bot_online_) { return; }