2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix transfer of my gifts from Resale.

This commit is contained in:
John Preston
2025-04-23 15:01:49 +04:00
parent ddfab824c3
commit 15146725e3
4 changed files with 52 additions and 11 deletions

View File

@@ -2108,6 +2108,7 @@ void GlobalStarGiftBox(
const Data::StarGift &data,
PeerId resaleRecipientId,
CreditsEntryBoxStyleOverrides st) {
const auto selfId = show->session().userPeerId();
const auto ownerId = data.unique ? data.unique->ownerId.value : 0;
Settings::GenericCreditsEntryBox(
box,
@@ -2116,7 +2117,9 @@ void GlobalStarGiftBox(
.credits = StarsAmount(data.stars),
.bareGiftStickerId = data.document->id,
.bareGiftOwnerId = ownerId,
.bareGiftResaleRecipientId = resaleRecipientId.value,
.bareGiftResaleRecipientId = ((resaleRecipientId != selfId)
? resaleRecipientId.value
: 0),
.stargiftId = data.id,
.uniqueGift = data.unique,
.peerType = Data::CreditsHistoryEntry::PeerType::Peer,