mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-25 06:53:01 +02:00
Don't try to open comments in invite peek channel.
This commit is contained in:
parent
bd1a46252d
commit
e42af74dd2
1 changed files with 9 additions and 1 deletions
|
@ -1309,7 +1309,15 @@ ClickHandlerPtr Message::createGoToCommentsLink() const {
|
|||
if (const auto window = App::wnd()) {
|
||||
if (const auto controller = window->sessionController()) {
|
||||
if (const auto item = controller->session().data().message(fullId)) {
|
||||
controller->showRepliesForMessage(item->history(), item->id);
|
||||
const auto history = item->history();
|
||||
if (const auto channel = history->peer->asChannel()) {
|
||||
if (channel->invitePeekExpires()) {
|
||||
Ui::Toast::Show(
|
||||
tr::lng_channel_invite_private(tr::now));
|
||||
return;
|
||||
}
|
||||
}
|
||||
controller->showRepliesForMessage(history, item->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue