From 351ba3a912879963c147f0d02fa0ae0ea9c012fc Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 5 Jun 2019 20:15:17 +0300 Subject: [PATCH] Allow adding bots as admins when creating a channel. --- .../SourceFiles/boxes/peers/add_participants_box.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp index 2384562ce..fdb70e905 100644 --- a/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/add_participants_box.cpp @@ -19,6 +19,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "dialogs/dialogs_indexed_list.h" #include "auth_session.h" #include "mainwidget.h" +#include "mainwindow.h" +#include "window/window_controller.h" #include "apiwrap.h" #include "observer_peer.h" @@ -218,7 +220,12 @@ void AddParticipantsBoxController::Start( [=] { box->closeBox(); }); if (justCreated) { box->boxClosing() | rpl::start_with_next([=] { - Ui::showPeerHistory(channel, ShowAtTheEndMsgId); + auto params = Window::SectionShow(); + params.activation = anim::activation::background; + App::wnd()->controller()->showPeerHistory( + channel, + params, + ShowAtTheEndMsgId); }, box->lifetime()); } };