mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Allow creating approve-only invite links.
This commit is contained in:
@@ -239,6 +239,25 @@ rpl::producer<int> MembersCountValue(not_null<PeerData*> peer) {
|
||||
Unexpected("User in MembersCountViewer().");
|
||||
}
|
||||
|
||||
rpl::producer<int> PendingRequestsCountValue(not_null<PeerData*> peer) {
|
||||
if (const auto chat = peer->asChat()) {
|
||||
return peer->session().changes().peerFlagsValue(
|
||||
peer,
|
||||
UpdateFlag::PendingRequests
|
||||
) | rpl::map([=] {
|
||||
return chat->pendingRequestsCount();
|
||||
});
|
||||
} else if (const auto channel = peer->asChannel()) {
|
||||
return peer->session().changes().peerFlagsValue(
|
||||
peer,
|
||||
UpdateFlag::PendingRequests
|
||||
) | rpl::map([=] {
|
||||
return channel->pendingRequestsCount();
|
||||
});
|
||||
}
|
||||
Unexpected("User in MembersCountViewer().");
|
||||
}
|
||||
|
||||
rpl::producer<int> AdminsCountValue(not_null<PeerData*> peer) {
|
||||
if (const auto chat = peer->asChat()) {
|
||||
return peer->session().changes().peerFlagsValue(
|
||||
|
Reference in New Issue
Block a user