diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 72296389fd..1686295049 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1922,6 +1922,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_action_no_forwards_feature_copying" = "Copying messages"; "lng_action_no_forwards_accept" = "Accept"; "lng_action_no_forwards_reject" = "Reject"; +"lng_action_no_forwards_request_expired" = "Sharing enable request has expired."; "lng_manage_peer_bot_public_link" = "Public Link"; "lng_manage_peer_bot_public_links" = "Public Links"; diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 1234c6909a..a09b0e680e 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -6707,7 +6707,12 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) { auto prepareNoForwardsRequest = [this](const MTPDmessageActionNoForwardsRequest &action) { auto result = PreparedServiceText(); - if (_from->isSelf()) { + const auto nfr = Get(); + if (nfr && nfr->expired) { + result.text = tr::lng_action_no_forwards_request_expired( + tr::now, + tr::marked); + } else if (_from->isSelf()) { result.text = tr::lng_action_no_forwards_request_you( tr::now, tr::marked); diff --git a/Telegram/SourceFiles/history/view/history_view_element.cpp b/Telegram/SourceFiles/history/view/history_view_element.cpp index c195695689..e0a9731b8f 100644 --- a/Telegram/SourceFiles/history/view/history_view_element.cpp +++ b/Telegram/SourceFiles/history/view/history_view_element.cpp @@ -1544,7 +1544,8 @@ void Element::refreshMedia(Element *replacing) { this, std::make_unique(this, emoji)); } - } else if (const auto nfr = item->Get()) { + } else if (const auto nfr = item->Get() + ; nfr && !nfr->expired) { _media = std::make_unique( this, GenerateNoForwardsRequestMedia(this, nfr),