From f62b9f0bbd168a26ac410943b54207520e7f827d Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 31 Dec 2019 03:51:48 +0300 Subject: [PATCH] Do not add active live locations to the list for bots. GitOrigin-RevId: 01b22101f53b70195dc4f90d2a4a9283ec2b7f95 --- td/telegram/MessagesManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 1f393df16..8ba5ae202 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -16296,6 +16296,9 @@ void MessagesManager::on_load_active_live_location_messages_finished() { void MessagesManager::try_add_active_live_location(DialogId dialog_id, const Message *m) { CHECK(m != nullptr); + if (td_->auth_manager_->is_bot()) { + return; + } if (m->content->get_type() != MessageContentType::LiveLocation || m->message_id.is_scheduled() || m->message_id.is_local() || m->via_bot_user_id.is_valid() || m->forward_info != nullptr) { return; @@ -16310,6 +16313,9 @@ void MessagesManager::try_add_active_live_location(DialogId dialog_id, const Mes } void MessagesManager::add_active_live_location(FullMessageId full_message_id) { + if (td_->auth_manager_->is_bot()) { + return; + } if (!active_live_location_full_message_ids_.insert(full_message_id).second) { return; }