mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix incorrect reporting of gift as channel's.
This commit is contained in:
@@ -1301,7 +1301,12 @@ void SendGift(
|
||||
const auto channel = (service && peerIsChannel(to))
|
||||
? session->data().channel(peerToChannel(to)).get()
|
||||
: nullptr;
|
||||
const auto channelSavedId = data.vsaved_id().value_or_empty();
|
||||
const auto channelSavedId = channel
|
||||
? data.vsaved_id().value_or_empty()
|
||||
: uint64();
|
||||
const auto realGiftMsgId = (peerIsUser(to) && data.vsaved_id())
|
||||
? MsgId(data.vsaved_id().value_or_empty())
|
||||
: MsgId(message.vid().v);
|
||||
|
||||
result = std::make_shared<Data::GiftUpgradeResult>(
|
||||
Data::GiftUpgradeResult{
|
||||
@@ -1310,8 +1315,7 @@ void SendGift(
|
||||
? Data::SavedStarGiftId::Chat(
|
||||
channel,
|
||||
channelSavedId)
|
||||
: Data::SavedStarGiftId::User(
|
||||
MsgId(message.vid().v)),
|
||||
: Data::SavedStarGiftId::User(realGiftMsgId),
|
||||
.date = message.vdate().v,
|
||||
.starsForDetailsRemove = int(
|
||||
data.vdrop_original_details_stars(
|
||||
|
||||
Reference in New Issue
Block a user