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

Track message reactions.

This commit is contained in:
John Preston
2019-09-11 12:26:13 +03:00
parent a1439163ce
commit f5c7b206bb
8 changed files with 222 additions and 0 deletions

View File

@@ -1617,6 +1617,19 @@ void Updates::feedUpdate(const MTPUpdate &update) {
}
} break;
case mtpc_updateMessageReactions: {
const auto &d = update.c_updateMessageReactions();
const auto peer = peerFromMTP(d.vpeer());
if (const auto history = session().data().historyLoaded(peer)) {
const auto item = session().data().message(
peer,
d.vmsg_id().v);
if (item) {
item->updateReactions(d.vreactions());
}
}
} break;
// Messages being read.
case mtpc_updateReadHistoryInbox: {
auto &d = update.c_updateReadHistoryInbox();