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

Strictly match message / media types.

This commit is contained in:
John Preston
2018-12-17 12:16:06 +04:00
parent 6d9f40db30
commit eb7201a55b
13 changed files with 292 additions and 303 deletions

View File

@@ -2773,7 +2773,7 @@ void ApiWrap::gotWebPages(ChannelData *channel, const MTPmessages_Messages &msgs
auto indices = base::flat_map<uint64, int>(); // copied from feedMsgs
for (auto i = 0, l = v->size(); i != l; ++i) {
const auto msgId = idFromMessage(v->at(i));
const auto msgId = IdFromMessage(v->at(i));
indices.emplace((uint64(uint32(msgId)) << 32) | uint64(i), i);
}
@@ -3434,8 +3434,8 @@ void ApiWrap::requestMessageAfterDate(
if (auto list = getMessagesList()) {
App::feedMsgs(*list, NewMessageExisting);
for (auto &message : *list) {
if (dateFromMessage(message) >= offsetDate) {
callback(idFromMessage(message));
if (DateFromMessage(message) >= offsetDate) {
callback(IdFromMessage(message));
return;
}
}