fix job msg del
This commit is contained in:
parent
e547dd58b2
commit
3a73d6e55a
7
job.go
7
job.go
@ -611,9 +611,11 @@ func jobMsgDelete(j Job) {
|
||||
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
|
||||
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
|
||||
} else {
|
||||
delay = p.Delay
|
||||
p.Delay = 0
|
||||
p.ObjMsgID64 = j.Trigger
|
||||
b, _ := json.Marshal(p)
|
||||
_, err = createJob(cacheObjSubType[`job_msg_del`], objJobPriority, j.UserID64, 0, time.Now().Add(p.Delay).UTC(), b)
|
||||
_, err = createJob(cacheObjSubType[`job_msg_del`], objJobPriority, j.UserID64, 0, time.Now().Add(delay).UTC(), b)
|
||||
}
|
||||
} else {
|
||||
log.Printf("jobMsgDelete : cannot identify msg to delete")
|
||||
@ -624,9 +626,10 @@ func jobMsgDelete(j Job) {
|
||||
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(p.ObjMsgID64, 10)+")")
|
||||
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
|
||||
} else {
|
||||
delay := p.Delay
|
||||
p.Delay = 0
|
||||
b, _ := json.Marshal(p)
|
||||
_, err = createJob(cacheObjSubType[`job_msg_del`], objJobPriority, j.UserID64, 0, time.Now().Add(p.Delay).UTC(), b)
|
||||
_, err = createJob(cacheObjSubType[`job_msg_del`], objJobPriority, j.UserID64, 0, time.Now().Add(delay).UTC(), b)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user