2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Update API scheme to layer 126.

This commit is contained in:
John Preston
2021-03-19 18:01:21 +04:00
parent 0052c7938f
commit a0a13c3b86
18 changed files with 447 additions and 300 deletions

View File

@@ -1068,11 +1068,16 @@ void PeerMenuAddChannelMembers(
auto already = (
list
) | ranges::views::transform([](const MTPChannelParticipant &p) {
return p.match([](const auto &data) {
return data.vuser_id().v;
return p.match([](const MTPDchannelParticipantBanned &data) {
return peerFromMTP(data.vpeer());
}, [](const auto &data) {
return peerFromUser(data.vuser_id());
});
}) | ranges::views::transform([&](UserId userId) {
return channel->owner().userLoaded(userId);
}) | ranges::views::transform([&](PeerId participantId) {
return peerIsUser(participantId)
? channel->owner().userLoaded(
peerToUser(participantId))
: nullptr;
}) | ranges::views::filter([](UserData *user) {
return (user != nullptr);
}) | ranges::to_vector;