2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Allow creating approve-only invite links.

This commit is contained in:
John Preston
2021-10-12 12:39:07 +04:00
parent e471d61d7a
commit 3af3f85f82
20 changed files with 259 additions and 52 deletions

View File

@@ -1965,6 +1965,18 @@ void Updates::feedUpdate(const MTPUpdate &update) {
}
} break;
case mtpc_updatePendingJoinRequests: {
const auto &d = update.c_updatePendingJoinRequests();
if (const auto peer = session().data().peerLoaded(peerFromMTP(d.vpeer()))) {
const auto count = d.vrequests_pending().v;
if (const auto chat = peer->asChat()) {
chat->setPendingRequestsCount(count);
} else if (const auto channel = peer->asChannel()) {
channel->setPendingRequestsCount(count);
}
}
} break;
case mtpc_updateServiceNotification: {
const auto &d = update.c_updateServiceNotification();
const auto text = TextWithEntities {