diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 87802b4f2..0b46cc479 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -2955,6 +2955,10 @@ void Message::refreshDataIdHook() { if (base::take(_fastReplyLink)) { _fastReplyLink = fastReplyLink(); } + if (_viewButton) { + _viewButton = nullptr; + updateViewButtonExistence(); + } if (_comments) { _comments->link = nullptr; } diff --git a/Telegram/SourceFiles/history/view/history_view_view_button.cpp b/Telegram/SourceFiles/history/view/history_view_view_button.cpp index c5448392a..0ba4f8f2c 100644 --- a/Telegram/SourceFiles/history/view/history_view_view_button.cpp +++ b/Telegram/SourceFiles/history/view/history_view_view_button.cpp @@ -89,6 +89,9 @@ inline auto WebPageToPhrase(not_null webpage) { if (const auto giveaway = media->giveaway()) { const auto peer = media->parent()->history()->peer; const auto messageId = media->parent()->id; + if (media->parent()->isSending() || media->parent()->hasFailed()) { + return nullptr; + } const auto info = *giveaway; return std::make_shared([=]( ClickContext context) {