From d343431e75dd8521a57035f2a66689d2eea3d85e Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 27 Feb 2026 14:37:09 +0400 Subject: [PATCH] Remove sender name from gift offer text. --- Telegram/Resources/langs/lang.strings | 2 +- Telegram/SourceFiles/history/history_item.cpp | 9 ++------- .../history/view/media/history_view_theme_document.cpp | 8 ++------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index a24bdeac4b..c15f5187fc 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2418,7 +2418,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_action_gift_premium_about" = "Subscription for exclusive Telegram features."; "lng_action_gift_refunded" = "This gift was downgraded because a request to refund the payment related to this gift was made, and the money was returned."; "lng_action_gift_got_ton" = "Use TON to suggest posts to channels."; -"lng_action_gift_offer" = "{user} offered you {cost} for {name}."; +"lng_action_gift_offer_incoming" = "An offer to buy this gift for {amount}."; "lng_action_gift_offer_you" = "You offered {cost} for {name}."; "lng_action_gift_offer_state_expires" = "This offer expires in {time}."; "lng_action_gift_offer_time_large" = "{hours} h"; diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 7f1a171473..d0f63a7f12 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -6582,15 +6582,10 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) { giftName, tr::marked); } else { - result.links.push_back(fromLink()); - result.text = tr::lng_action_gift_offer( + result.text = tr::lng_action_gift_offer_incoming( tr::now, - lt_user, - fromLinkText(), - lt_cost, + lt_amount, cost, - lt_name, - giftName, tr::marked); } }, [](const MTPDstarGift &) { diff --git a/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp index 16b4c5a3f5..12df63ef02 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp @@ -656,14 +656,10 @@ TextWithEntities GiftServiceBox::subtitle() { giftName, tr::marked)); } else { - text.append(tr::lng_action_gift_offer( + text.append(tr::lng_action_gift_offer_incoming( tr::now, - lt_user, - tr::bold(_parent->data()->from()->shortName()), - lt_cost, + lt_amount, cost, - lt_name, - giftName, tr::marked)); } text.append(u"\n\n"_q);