Show better error on invite peek discussion group open.

This commit is contained in:
John Preston 2021-02-23 17:16:29 +04:00
parent 1a3253ae8b
commit 27681db7f6
1 changed files with 5 additions and 0 deletions

View File

@ -552,6 +552,11 @@ void Filler::addChannelActions(not_null<ChannelData*> 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);