mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-24 04:35:22 +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: "
|
LOG(("API Error: "
|
||||||
"channels.channelParticipantsNotModified received!"));
|
"channels.channelParticipantsNotModified received!"));
|
||||||
});
|
});
|
||||||
}).fail([=] {
|
}).fail([=](const MTP::Error &error) {
|
||||||
_botsRequests.remove(channel);
|
_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();
|
}).send();
|
||||||
|
|
||||||
_botsRequests[channel] = requestId;
|
_botsRequests[channel] = requestId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue