mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Show correct error for discuss groups.
This commit is contained in:
@@ -4236,6 +4236,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_rights_restriction_for_all" = "This option is disabled for all members in Group Permissions.";
|
||||
"lng_rights_permission_for_all" = "This option is enabled for all members in Group Permissions.";
|
||||
"lng_rights_permission_unavailable" = "This permission is not available in public groups.";
|
||||
"lng_rights_permission_in_discuss" = "This permission is not available in discussion groups.";
|
||||
"lng_rights_permission_cant_edit" = "You cannot change this permission.";
|
||||
"lng_rights_user_restrictions" = "User permissions";
|
||||
"lng_rights_user_restrictions_header" = "What can this member do?";
|
||||
|
@@ -1129,11 +1129,14 @@ void ShowEditPeerPermissionsBox(
|
||||
disabledByAdminRights,
|
||||
tr::lng_rights_permission_cant_edit(tr::now));
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
if (channel->isPublic()
|
||||
|| (channel->isMegagroup() && channel->linkedChat())) {
|
||||
if (channel->isPublic()) {
|
||||
result.emplace(
|
||||
Flag::ChangeInfo | Flag::PinMessages,
|
||||
tr::lng_rights_permission_unavailable(tr::now));
|
||||
} else if (channel->isMegagroup() && channel->linkedChat()) {
|
||||
result.emplace(
|
||||
Flag::ChangeInfo | Flag::PinMessages,
|
||||
tr::lng_rights_permission_in_discuss(tr::now));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user