Show error when joining a full group.

This commit is contained in:
John Preston 2018-03-12 10:55:30 +03:00
parent 7691654cb8
commit 57d0b1d215
2 changed files with 3 additions and 0 deletions

View File

@ -819,6 +819,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_channel_not_accessible" = "Sorry, this channel is not accessible.";
"lng_group_not_accessible" = "Sorry, this group is not accessible.";
"lng_group_full" = "Sorry, this group is full.";
"lng_channels_too_much_public_about" = "Sorry, you have reserved too many public usernames. You can revoke the link from one of your older groups or channels.";
"lng_channels_too_much_public_revoke_confirm_group" = "Are you sure you want to revoke the link {link}?\n\nThe group «{group}» will become private.";

View File

@ -2995,6 +2995,8 @@ bool HistoryWidget::joinFail(const RPCError &error, mtpRequestId req) {
return true;
} else if (error.type() == qstr("CHANNELS_TOO_MUCH")) {
Ui::show(Box<InformBox>(lang(lng_join_channel_error)));
} else if (error.type() == qstr("USERS_TOO_MUCH")) {
Ui::show(Box<InformBox>(lang(lng_group_full)));
}
return false;