mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-10-03 13:26:03 +00:00
Apply short topic info from channelMessages.
This commit is contained in:
@@ -152,18 +152,22 @@ void MessagesSearch::searchReceived(
|
||||
const auto total = int(data.vcount().v);
|
||||
return FoundMessages{ total, std::move(items), nextToken };
|
||||
}, [&](const MTPDmessages_channelMessages &data) {
|
||||
if (const auto channel = _history->peer->asChannel()) {
|
||||
channel->ptsReceived(data.vpts().v);
|
||||
} else {
|
||||
LOG(("API Error: "
|
||||
"received messages.channelMessages when no channel "
|
||||
"was passed!"));
|
||||
}
|
||||
if (_requestId != 0) {
|
||||
// Don't apply cached data!
|
||||
owner.processUsers(data.vusers());
|
||||
owner.processChats(data.vchats());
|
||||
}
|
||||
if (const auto channel = _history->peer->asChannel()) {
|
||||
channel->ptsReceived(data.vpts().v);
|
||||
if (_requestId != 0) {
|
||||
// Don't apply cached data!
|
||||
channel->processTopics(data.vtopics());
|
||||
}
|
||||
} else {
|
||||
LOG(("API Error: "
|
||||
"received messages.channelMessages when no channel "
|
||||
"was passed!"));
|
||||
}
|
||||
auto items = HistoryItemsFromTL(&owner, data.vmessages().v);
|
||||
const auto total = int(data.vcount().v);
|
||||
return FoundMessages{ total, std::move(items), nextToken };
|
||||
|
Reference in New Issue
Block a user