fix g deposit

This commit is contained in:
shoopea 2019-08-29 19:55:06 +08:00
parent 92117ee560
commit dc009b1b43

2
job.go
View File

@ -740,11 +740,13 @@ func jobGDepositForward(j Job) {
cwm, err := parseSubTypeMessageGDepositAck(msg, rule.re)
if cwm.ItemID64 == p.ItemID64 && cwm.Quantity == p.Quantity {
log.Printf("jobGDepositForward : match (%d / %d).\n", cwm.ItemID64, cwm.Quantity)
clientFwdCWMsg(cwm.Msg.ID64, cwm.Msg.ChatID64, cfg.Bot.Depositchat)
err = setJobDone(j.ID64)
logOnError(err, "jobGDeposit : setJobDone")
} else {
log.Printf("jobGDepositForward : found (%d / %d), expected (%d / %d).\n", cwm.ItemID64, cwm.Quantity, p.ItemID64, p.Quantity)
err = rescheduleJob(j.ID64, 0, time.Unix(maxUnixTimestamp, 0).UTC())
logOnError(err, "jobGDepositForward : rescheduleJob")
setJobCallback(j.ID64, j.UserID64, objSubTypeMessageGDepositAck)