2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Apply short topic info from channelMessages.

This commit is contained in:
John Preston
2022-11-08 15:36:46 +04:00
parent 983b6af0b4
commit c7741cb62a
17 changed files with 121 additions and 74 deletions

View File

@@ -2870,18 +2870,18 @@ void ApiWrap::requestMessageAfterDate(
};
const auto list = result.match([&](
const MTPDmessages_messages &data) {
return handleMessages(result.c_messages_messages());
return handleMessages(data);
}, [&](const MTPDmessages_messagesSlice &data) {
return handleMessages(result.c_messages_messagesSlice());
return handleMessages(data);
}, [&](const MTPDmessages_channelMessages &data) {
const auto &messages = result.c_messages_channelMessages();
if (peer && peer->isChannel()) {
peer->asChannel()->ptsReceived(messages.vpts().v);
if (const auto channel = peer->asChannel()) {
channel->ptsReceived(data.vpts().v);
channel->processTopics(data.vtopics());
} else {
LOG(("API Error: received messages.channelMessages when "
"no channel was passed! (ApiWrap::jumpToDate)"));
}
return handleMessages(messages);
return handleMessages(data);
}, [&](const MTPDmessages_messagesNotModified &) {
LOG(("API Error: received messages.messagesNotModified! "
"(ApiWrap::jumpToDate)"));