mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-20 23:27:23 +00:00
added ADMINS_TOO_MUCH error handle (when adding too much admins to a channel)
This commit is contained in:
parent
59abcc2986
commit
087e2970cd
@ -430,6 +430,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
|
||||
"lng_channel_admins" = "Administrators";
|
||||
"lng_channel_add_admin" = "Add Administrator";
|
||||
"lng_channel_admin_sure" = "Add {user} to administrators?";
|
||||
"lng_channel_admins_too_much" = "Sorry, you have reached the limit of channel administrators. Please remove some administrator first.";
|
||||
|
||||
"lng_participant_filter" = "Search";
|
||||
"lng_participant_invite" = "Invite";
|
||||
|
@ -199,7 +199,9 @@ bool ContactsInner::addAdminFail(const RPCError &error, mtpRequestId req) {
|
||||
_addAdminRequestId = 0;
|
||||
if (error.type() == "USERS_TOO_MUCH") {
|
||||
App::wnd()->replaceLayer(new MaxInviteBox(_channel->invitationUrl));
|
||||
} else {
|
||||
} else if (error.type() == "ADMINS_TOO_MUCH") {
|
||||
App::wnd()->replaceLayer(new InformBox(lang(lng_channel_admins_too_much)));
|
||||
} else {
|
||||
if (_addAdminBox) _addAdminBox->onClose();
|
||||
emit adminAdded();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user