mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Support expired state for allow-sharing request.
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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<HistoryServiceNoForwardsRequest>();
|
||||
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);
|
||||
|
||||
@@ -1544,7 +1544,8 @@ void Element::refreshMedia(Element *replacing) {
|
||||
this,
|
||||
std::make_unique<LargeEmoji>(this, emoji));
|
||||
}
|
||||
} else if (const auto nfr = item->Get<HistoryServiceNoForwardsRequest>()) {
|
||||
} else if (const auto nfr = item->Get<HistoryServiceNoForwardsRequest>()
|
||||
; nfr && !nfr->expired) {
|
||||
_media = std::make_unique<MediaGeneric>(
|
||||
this,
|
||||
GenerateNoForwardsRequestMedia(this, nfr),
|
||||
|
||||
Reference in New Issue
Block a user