diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 2adb08577..b831c8ea3 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -2391,15 +2391,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { : (Data::CanSendAnything(peer) && (!peer->isChannel() || peer->asChannel()->amIn())); }(); - const auto canReply = canSendReply || [&] { - const auto peer = item->history()->peer; - if (const auto chat = peer->asChat()) { - return !chat->isForbidden(); - } else if (const auto channel = peer->asChannel()) { - return !channel->isForbidden(); - } - return true; - }(); + const auto canReply = canSendReply || item->allowsForward(); if (canReply) { const auto itemId = item->fullId(); const auto quote = selectedQuote(item); diff --git a/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp b/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp index 483a8d280..9b2b3f889 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp @@ -650,14 +650,16 @@ void DraftOptionsBox( const auto setupReplyActions = [=] { AddFilledSkip(bottom); - Settings::AddButton( - bottom, - tr::lng_reply_in_another_chat(), - st::settingsButton, - { &st::menuIconReplace } - )->setClickedCallback([=] { - ShowReplyToChatBox(show, resolveReply(), clearOldDraft); - }); + if (replyItem->allowsForward()) { + Settings::AddButton( + bottom, + tr::lng_reply_in_another_chat(), + st::settingsButton, + { &st::menuIconReplace } + )->setClickedCallback([=] { + ShowReplyToChatBox(show, resolveReply(), clearOldDraft); + }); + } Settings::AddButton( bottom, diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 562069bc0..9ae59286b 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -592,15 +592,7 @@ bool AddReplyToMessageAction( const auto canSendReply = topic ? Data::CanSendAnything(topic) : Data::CanSendAnything(peer); - const auto canReply = canSendReply || [&] { - const auto peer = item->history()->peer; - if (const auto chat = peer->asChat()) { - return !chat->isForbidden(); - } else if (const auto channel = peer->asChannel()) { - return !channel->isForbidden(); - } - return true; - }(); + const auto canReply = canSendReply || item->allowsForward(); if (!canReply) { return false; }