Don't allow sharing public groups with requests in folders.

This commit is contained in:
John Preston 2023-04-03 12:16:57 +04:00
parent 312aa4b130
commit 63960c647b
1 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,8 @@ struct Errors {
}
return std::nullopt;
} else if (const auto channel = history->peer->asChannel()) {
if (!channel->canHaveInviteLink() && !channel->hasUsername()) {
if (!channel->canHaveInviteLink()
&& (!channel->hasUsername() || channel->requestToJoin())) {
return result(
tr::lng_filters_link_noadmin_status(tr::now),
(channel->isMegagroup()