From 21c647147a541e61ab5c1874f7c184a10c00b256 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 15 Apr 2022 13:06:59 +0300 Subject: [PATCH] Fixed total count of found messages in channels via api search. --- Telegram/SourceFiles/api/api_messages_search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/api/api_messages_search.cpp b/Telegram/SourceFiles/api/api_messages_search.cpp index f1de7b3a0..8997748b2 100644 --- a/Telegram/SourceFiles/api/api_messages_search.cpp +++ b/Telegram/SourceFiles/api/api_messages_search.cpp @@ -159,7 +159,7 @@ void MessagesSearch::searchReceived( owner.processChats(data.vchats()); } auto items = HistoryItemsFromTL(&owner, data.vmessages().v); - const auto total = int(data.vmessages().v.size()); + const auto total = int(data.vcount().v); return FoundMessages{ total, std::move(items), nextToken }; }, [](const MTPDmessages_messagesNotModified &data) { return FoundMessages{};