Fix requesting bots list in megagroup.

This commit is contained in:
John Preston 2021-11-25 19:24:08 +04:00
parent 0f443da758
commit 07ba84c857
1 changed files with 2 additions and 1 deletions

View File

@ -411,7 +411,7 @@ void ChatParticipants::requestBots(not_null<ChannelData*> channel) {
_botsRequests.remove(channel); _botsRequests.remove(channel);
result.match([&](const MTPDchannels_channelParticipants &data) { result.match([&](const MTPDchannels_channelParticipants &data) {
const auto &[availableCount, list] = Parse(channel, data); const auto &[availableCount, list] = Parse(channel, data);
ApplyLastList(channel, availableCount, list); ApplyBotsList(channel, availableCount, list);
}, [](const MTPDchannels_channelParticipantsNotModified &) { }, [](const MTPDchannels_channelParticipantsNotModified &) {
LOG(("API Error: " LOG(("API Error: "
"channels.channelParticipantsNotModified received!")); "channels.channelParticipantsNotModified received!"));
@ -518,6 +518,7 @@ ChatParticipants::Parsed ChatParticipants::Parse(
not_null<ChannelData*> channel, not_null<ChannelData*> channel,
const TLMembers &data) { const TLMembers &data) {
channel->owner().processUsers(data.vusers()); channel->owner().processUsers(data.vusers());
channel->owner().processChats(data.vchats());
auto list = ParseList(data, channel); auto list = ParseList(data, channel);
if (channel->mgInfo) { if (channel->mgInfo) {
RefreshChannelAdmins(channel, list); RefreshChannelAdmins(channel, list);