fix: sync StarGift prepaid upgrade message refs
This commit is contained in:
parent
8cfb6f74c1
commit
045e0f6db4
8 changed files with 754 additions and 148 deletions
|
|
@ -140,8 +140,12 @@ VALUES($1,$2,$3,$4,$5,$6,$7)`, req.PayerUserID, req.CommandKey, locked.ID, req.F
|
|||
}
|
||||
return projectPrivateStarGiftSourceRef(ctx, tx, messageReq, result.Saved.Owner.ID, result.Saved.MsgID)
|
||||
}, after: func(ctx context.Context, tx pgx.Tx, sent domain.SendPrivateTextResult) error {
|
||||
if req.Owner.Type != domain.PeerTypeChannel {
|
||||
return nil
|
||||
if req.Owner.Type == domain.PeerTypeUser {
|
||||
ownerMessageID := sent.RecipientMessage.ID
|
||||
if sent.SenderMessage.OwnerUserID == req.Owner.ID {
|
||||
ownerMessageID = sent.SenderMessage.ID
|
||||
}
|
||||
return registerUserStarGiftMessageRef(ctx, tx, req.Owner.ID, ownerMessageID, result.Saved.ID, 0)
|
||||
}
|
||||
action := messageReq.Media.ServiceAction.StarGift
|
||||
return NewChannelStore(tx).appendStarGiftAdminLogTx(ctx, tx, req.Owner.ID, req.PayerUserID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue