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

Save recent requester userIds from API.

This commit is contained in:
John Preston
2021-10-27 09:57:37 +04:00
parent f839c7f2bb
commit 36271d6b85
5 changed files with 61 additions and 12 deletions

View File

@@ -1970,10 +1970,11 @@ void Updates::feedUpdate(const MTPUpdate &update) {
const auto &d = update.c_updatePendingJoinRequests();
if (const auto peer = session().data().peerLoaded(peerFromMTP(d.vpeer()))) {
const auto count = d.vrequests_pending().v;
const auto &requesters = d.vrecent_requesters().v;
if (const auto chat = peer->asChat()) {
chat->setPendingRequestsCount(count);
chat->setPendingRequestsCount(count, requesters);
} else if (const auto channel = peer->asChannel()) {
channel->setPendingRequestsCount(count);
channel->setPendingRequestsCount(count, requesters);
}
}
} break;