Action Message Text: Fix text for star gift unique (#6208)

This commit is contained in:
Alexander Zinchuk 2025-09-19 14:34:16 +02:00
parent a07e7d9a53
commit 6aaa71102c

View File

@ -607,7 +607,7 @@ const ActionMessageText = ({
case 'starGiftUnique': { case 'starGiftUnique': {
const { const {
isTransferred, isUpgrade, savedId, peerId, fromId, resaleAmount, gift, isTransferred, isUpgrade, savedId, peerId, fromId, resaleAmount, gift, transferStars,
} = action; } = action;
const isToChannel = Boolean(peerId && savedId); const isToChannel = Boolean(peerId && savedId);
@ -616,7 +616,7 @@ const ActionMessageText = ({
const fromTitle = (fromPeer && getPeerTitle(lang, fromPeer)) || userFallbackText; const fromTitle = (fromPeer && getPeerTitle(lang, fromPeer)) || userFallbackText;
const fromLink = renderPeerLink(fromPeer?.id, fromTitle, asPreview); const fromLink = renderPeerLink(fromPeer?.id, fromTitle, asPreview);
if (resaleAmount) { if (resaleAmount && !transferStars) {
const amountText = resaleAmount.currency === TON_CURRENCY_CODE const amountText = resaleAmount.currency === TON_CURRENCY_CODE
? formatTonAsText(lang, convertTonFromNanos(resaleAmount.amount)) ? formatTonAsText(lang, convertTonFromNanos(resaleAmount.amount))
: formatStarsAsText(lang, resaleAmount.amount); : formatStarsAsText(lang, resaleAmount.amount);
@ -675,7 +675,7 @@ const ActionMessageText = ({
return lang('ActionStarGiftUpgradedUser', { user: senderLink }, { withNodes: true }); return lang('ActionStarGiftUpgradedUser', { user: senderLink }, { withNodes: true });
} }
if (isTransferred) { if ((isTransferred || transferStars) && !resaleAmount) {
if (sender?.id === SERVICE_NOTIFICATIONS_USER_ID) { if (sender?.id === SERVICE_NOTIFICATIONS_USER_ID) {
return lang('ActionStarGiftTransferredUnknown'); return lang('ActionStarGiftTransferredUnknown');
} }