mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-20 15:17:41 +00:00
Always allow group admins to edit invite link.
Show Group Info even if supergroup admin can't edit information.
This commit is contained in:
parent
3b3a705a67
commit
b20c2b4774
@ -102,7 +102,16 @@ void ShowRecentActions(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<ChannelData*> channel) {
|
||||
controller->showSection(AdminLog::SectionMemento(channel));
|
||||
}
|
||||
|
||||
bool HasEditInfoBox(not_null<ChannelData*> channel) {
|
||||
if (channel->canEditInformation()) {
|
||||
return true;
|
||||
} else if (!channel->isPublic() && channel->canAddMembers()) {
|
||||
// Edit invite link.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void FillManageBox(
|
||||
@ -112,7 +121,7 @@ void FillManageBox(
|
||||
using Profile::ParticipantsBoxController;
|
||||
|
||||
auto isGroup = channel->isMegagroup();
|
||||
if (channel->canEditInformation()) {
|
||||
if (HasEditInfoBox(channel)) {
|
||||
AddButton(
|
||||
content,
|
||||
Lang::Viewer(isGroup
|
||||
|
Loading…
Reference in New Issue
Block a user