mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-28 01:23:09 +00:00
Handle USERS_TOO_FEW error in group creation.
This commit is contained in:
parent
9f76be9d26
commit
86c0205faa
@ -394,6 +394,9 @@ void GroupInfoBox::createGroup(not_null<PeerListBox*> selectUsersBox, const QStr
|
||||
inputs.push_back(user->inputUser);
|
||||
}
|
||||
}
|
||||
if (inputs.empty()) {
|
||||
return;
|
||||
}
|
||||
_creationRequestId = request(MTPmessages_CreateChat(MTP_vector<MTPInputUser>(inputs), MTP_string(title))).done([this](const MTPUpdates &result) {
|
||||
Ui::hideLayer();
|
||||
|
||||
@ -439,6 +442,9 @@ void GroupInfoBox::createGroup(not_null<PeerListBox*> selectUsersBox, const QStr
|
||||
_title->showError();
|
||||
}
|
||||
} else if (error.type() == qstr("USERS_TOO_FEW")) {
|
||||
Ui::show(
|
||||
Box<InformBox>(lang(lng_cant_invite_privacy)),
|
||||
LayerOption::KeepOther);
|
||||
} else if (error.type() == qstr("PEER_FLOOD")) {
|
||||
Ui::show(
|
||||
Box<InformBox>(
|
||||
|
Loading…
Reference in New Issue
Block a user