2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

handling errors for spammers

This commit is contained in:
John Preston
2015-09-09 10:46:31 +03:00
parent 7a278729e1
commit ce678bad68
8 changed files with 103 additions and 71 deletions

View File

@@ -1282,7 +1282,7 @@ void CreateGroupBox::created(const MTPUpdates &updates) {
}
bool CreateGroupBox::failed(const RPCError &error) {
if (error.type().startsWith(qsl("FLOOD_WAIT_"))) return false;
if (mtpIsFlood(error)) return false;
_createRequestId = 0;
if (error.type() == "NO_CHAT_TITLE") {
@@ -1291,6 +1291,10 @@ bool CreateGroupBox::failed(const RPCError &error) {
} else if (error.type() == "USERS_TOO_FEW") {
emit closed();
return true;
} else if (error.type() == "PEER_FLOOD") {
emit closed();
App::wnd()->showLayer(new ConfirmBox(lang(lng_cant_invite_not_contact), true));
return true;
}
return false;
}