From ff1b4566f06672ba2df5e02252be28a2b4c4346a Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 3 Dec 2019 00:44:13 +0300 Subject: [PATCH] Decrease total_count when get invalid recent location. GitOrigin-RevId: 26bd0b3be1211fb2a9cad34034c54d68764b6f56 --- td/telegram/MessagesManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 1d0024ad..01f91c54 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -8047,12 +8047,14 @@ void MessagesManager::on_get_recent_locations(DialogId dialog_id, int32 limit, i if (new_message != FullMessageId()) { if (new_message.get_dialog_id() != dialog_id) { LOG(ERROR) << "Receive " << new_message << " instead of a message in " << dialog_id; + total_count--; continue; } auto m = get_message(new_message); if (m->content->get_type() != MessageContentType::LiveLocation) { LOG(ERROR) << "Receive a message of wrong type " << m->content->get_type() << " in on_get_recent_locations in " << dialog_id; + total_count--; continue; }