diff --git a/Telegram/SourceFiles/api/api_credits.cpp b/Telegram/SourceFiles/api/api_credits.cpp index 4d296286b..fa6a0b8c5 100644 --- a/Telegram/SourceFiles/api/api_credits.cpp +++ b/Telegram/SourceFiles/api/api_credits.cpp @@ -43,7 +43,8 @@ constexpr auto kTransactionsLimit = 100; .date = base::unixtime::parse(tl.data().vdate().v), .photoId = photo ? photo->id : 0, .credits = tl.data().vstars().v, - .bareId = barePeerId, + .bareMsgId = uint64(tl.data().vmsg_id().value_or_empty()), + .barePeerId = barePeerId, .peerType = tl.data().vpeer().match([](const HistoryPeerTL &) { return Data::CreditsHistoryEntry::PeerType::Peer; }, [](const MTPDstarsTransactionPeerPlayMarket &) { diff --git a/Telegram/SourceFiles/boxes/gift_premium_box.cpp b/Telegram/SourceFiles/boxes/gift_premium_box.cpp index 150747663..44c5e3536 100644 --- a/Telegram/SourceFiles/boxes/gift_premium_box.cpp +++ b/Telegram/SourceFiles/boxes/gift_premium_box.cpp @@ -1646,12 +1646,12 @@ void AddCreditsHistoryEntryTable( container, st::giveawayGiftCodeTable), st::giveawayGiftCodeTableMargin); - if (entry.bareId) { + if (entry.barePeerId) { AddTableRow( table, tr::lng_credits_box_history_entry_peer(), controller, - PeerId(entry.bareId)); + PeerId(entry.barePeerId)); } using Type = Data::CreditsHistoryEntry::PeerType; if (entry.peerType == Type::AppStore) { diff --git a/Telegram/SourceFiles/data/data_credits.h b/Telegram/SourceFiles/data/data_credits.h index f013382e8..b1c9984f7 100644 --- a/Telegram/SourceFiles/data/data_credits.h +++ b/Telegram/SourceFiles/data/data_credits.h @@ -35,7 +35,8 @@ struct CreditsHistoryEntry final { QDateTime date; PhotoId photoId = 0; uint64 credits = 0; - uint64 bareId = 0; + uint64 bareMsgId = 0; + uint64 barePeerId = 0; PeerType peerType; bool refunded = false; bool pending = false; diff --git a/Telegram/SourceFiles/info/statistics/info_statistics_list_controllers.cpp b/Telegram/SourceFiles/info/statistics/info_statistics_list_controllers.cpp index 92920d2fc..c9c103978 100644 --- a/Telegram/SourceFiles/info/statistics/info_statistics_list_controllers.cpp +++ b/Telegram/SourceFiles/info/statistics/info_statistics_list_controllers.cpp @@ -938,8 +938,8 @@ void CreditsController::applySlice(const Data::CreditsStatusSlice &slice) { }, }; using Type = Data::CreditsHistoryEntry::PeerType; - if (item.bareId) { - const auto peer = session().data().peer(PeerId(item.bareId)); + if (const auto peerId = PeerId(item.barePeerId)) { + const auto peer = session().data().peer(peerId); return std::make_unique(peer, descriptor); } else if (item.peerType == Type::PremiumBot) { return std::make_unique(_premiumBot, descriptor); diff --git a/Telegram/SourceFiles/payments/payments_non_panel_process.cpp b/Telegram/SourceFiles/payments/payments_non_panel_process.cpp index aad25cdf5..69cf7abde 100644 --- a/Telegram/SourceFiles/payments/payments_non_panel_process.cpp +++ b/Telegram/SourceFiles/payments/payments_non_panel_process.cpp @@ -105,7 +105,8 @@ Fn ProcessNonPanelPaymentFormFactory( .date = base::unixtime::parse(receipt->date), .photoId = receipt->photo ? receipt->photo->id : 0, .credits = receipt->credits, - .bareId = receipt->peerId.value, + .bareMsgId = uint64(), + .barePeerId = receipt->peerId.value, .peerType = Data::CreditsHistoryEntry::PeerType::Peer, }; controller->uiShow()->show(Box( diff --git a/Telegram/SourceFiles/settings/settings_credits_graphics.cpp b/Telegram/SourceFiles/settings/settings_credits_graphics.cpp index 63521ec31..0aa341dd2 100644 --- a/Telegram/SourceFiles/settings/settings_credits_graphics.cpp +++ b/Telegram/SourceFiles/settings/settings_credits_graphics.cpp @@ -336,8 +336,8 @@ void ReceiptCreditsBox( const auto &stUser = st::boostReplaceUserpic; const auto peer = (e.peerType == Type::PremiumBot) ? premiumBot - : e.bareId - ? controller->session().data().peer(PeerId(e.bareId)).get() + : e.barePeerId + ? controller->session().data().peer(PeerId(e.barePeerId)).get() : nullptr; const auto photo = e.photoId ? controller->session().data().photo(e.photoId).get()