add cleanup

This commit is contained in:
shoopea 2020-01-17 12:31:30 +08:00
parent 6e57ce1506
commit 8f7478d909

7
job.go
View File

@ -1708,8 +1708,13 @@ func jobGWithdraw(j Job) {
ref = hex.EncodeToString(out) ref = hex.EncodeToString(out)
m, err := getObjMsg(j.Trigger)
logOnError(err, "jobGWithdraw : getObjMsg")
p.CleanupMsg = append(p.CleanupMsg, *m)
b, err = json.Marshal(p) b, err = json.Marshal(p)
log.Printf("jobGWithdraw[%d] : %s\n", string(b)) log.Printf("jobGWithdraw[%d] : %s\n", j.ID64, string(b))
u, err := bot.ChatByID(fmt.Sprintf("%d", p.UserID64)) u, err := bot.ChatByID(fmt.Sprintf("%d", p.UserID64))
logOnError(err, "jobGWithdraw : ChatByID") logOnError(err, "jobGWithdraw : ChatByID")