diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index bfaa9b231..9f2308730 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -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"; diff --git a/Telegram/SourceFiles/boxes/contactsbox.cpp b/Telegram/SourceFiles/boxes/contactsbox.cpp index 02af818fd..32bafe890 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.cpp +++ b/Telegram/SourceFiles/boxes/contactsbox.cpp @@ -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(); }