mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-24 14:33:02 +02:00
Don't flood with bot requests in monoforums.
This commit is contained in:
parent
fdce4bada7
commit
90b2c077a6
1 changed files with 8 additions and 1 deletions
|
@ -494,8 +494,15 @@ void ChatParticipants::requestBots(not_null<ChannelData*> channel) {
|
|||
LOG(("API Error: "
|
||||
"channels.channelParticipantsNotModified received!"));
|
||||
});
|
||||
}).fail([=] {
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
_botsRequests.remove(channel);
|
||||
if (error.type() == u"CHANNEL_MONOFORUM_UNSUPPORTED"_q) {
|
||||
channel->mgInfo->bots.clear();
|
||||
channel->mgInfo->botStatus = -1;
|
||||
channel->session().changes().peerUpdated(
|
||||
channel,
|
||||
Data::PeerUpdate::Flag::FullInfo);
|
||||
}
|
||||
}).send();
|
||||
|
||||
_botsRequests[channel] = requestId;
|
||||
|
|
Loading…
Add table
Reference in a new issue