mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show correct error for discuss groups.
This commit is contained in:
parent
a37f512949
commit
e6b76fefa1
2 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue