mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 00:46:08 +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_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_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_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_permission_cant_edit" = "You cannot change this permission.";
|
||||||
"lng_rights_user_restrictions" = "User permissions";
|
"lng_rights_user_restrictions" = "User permissions";
|
||||||
"lng_rights_user_restrictions_header" = "What can this member do?";
|
"lng_rights_user_restrictions_header" = "What can this member do?";
|
||||||
|
@@ -1129,11 +1129,14 @@ void ShowEditPeerPermissionsBox(
|
|||||||
disabledByAdminRights,
|
disabledByAdminRights,
|
||||||
tr::lng_rights_permission_cant_edit(tr::now));
|
tr::lng_rights_permission_cant_edit(tr::now));
|
||||||
if (const auto channel = peer->asChannel()) {
|
if (const auto channel = peer->asChannel()) {
|
||||||
if (channel->isPublic()
|
if (channel->isPublic()) {
|
||||||
|| (channel->isMegagroup() && channel->linkedChat())) {
|
|
||||||
result.emplace(
|
result.emplace(
|
||||||
Flag::ChangeInfo | Flag::PinMessages,
|
Flag::ChangeInfo | Flag::PinMessages,
|
||||||
tr::lng_rights_permission_unavailable(tr::now));
|
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;
|
return result;
|
||||||
|
Reference in New Issue
Block a user