fix job msg del

This commit is contained in:
shoopea 2020-01-13 16:45:26 +08:00
parent 8603af3768
commit b422b37eb4

4
job.go
View File

@ -620,8 +620,8 @@ func jobMsgDelete(j Job) {
} }
} else if p.ObjMsgID64 != 0 { } else if p.ObjMsgID64 != 0 {
if p.Delay == 0 { if p.Delay == 0 {
obj, err := getObjMsg(j.Trigger) obj, err := getObjMsg(p.ObjMsgID64)
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")") logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(p.ObjMsgID64, 10)+")")
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64) clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
} else { } else {
p.Delay = 0 p.Delay = 0