From 0a35931d0baadae59aa22d240d0cb0004b3998b8 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 17 Mar 2022 16:53:08 +0300 Subject: [PATCH] Returned ability to schedule livestreams to admins. --- .../SourceFiles/calls/group/calls_choose_join_as.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp b/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp index dad4dadbcb..bd9d6cfb0a 100644 --- a/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp +++ b/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp @@ -240,11 +240,9 @@ void ChooseJoinAsBox( style::margins()); delegate->setContent(content); controller->setDelegate(delegate); - auto next = (context == Context::Switch) - ? tr::lng_settings_save() - : tr::lng_continue(); -#if 0 - if ((context == Context::Create)) { + const auto &peer = info.peer; + if ((context == Context::Create) + && (peer->isChannel() && peer->asChannel()->hasAdminRights())) { const auto makeLink = [](const QString &text) { return Ui::Text::Link(text); }; @@ -265,7 +263,9 @@ void ChooseJoinAsBox( return false; }); } -#endif + auto next = (context == Context::Switch) + ? tr::lng_settings_save() + : tr::lng_continue(); box->addButton(std::move(next), [=] { auto copy = info; copy.joinAs = controller->selected();