From 27681db7f691a2646c5ede5492b18a9ca0374b37 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 23 Feb 2021 17:16:29 +0400 Subject: [PATCH] Show better error on invite peek discussion group open. --- Telegram/SourceFiles/window/window_peer_menu.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 4efeba6a16..7382ae4348 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -552,6 +552,11 @@ void Filler::addChannelActions(not_null channel) { if (channel->isBroadcast()) { if (const auto chat = channel->linkedChat()) { _addAction(tr::lng_profile_view_discussion(tr::now), [=] { + if (channel->invitePeekExpires()) { + Ui::Toast::Show( + tr::lng_channel_invite_private(tr::now)); + return; + } navigation->showPeerHistory( chat, Window::SectionShow::Way::Forward);