test job msg del

This commit is contained in:
shoopea 2020-01-13 16:36:13 +08:00
parent 34edcd5fc0
commit c2d51ce662
2 changed files with 4 additions and 1 deletions

2
bot.go
View File

@ -941,7 +941,7 @@ func botGWithdraw(m *tb.Message) {
TGCmdQueue <- c
return
}
userID64 := clt.TGUserID64
// userID64 := clt.TGUserID64
clt.Mux.Unlock()
r := regexp.MustCompile("^(( )*[a-z0-9]+ [0-9]+( )*)+$")

3
job.go
View File

@ -599,9 +599,11 @@ func jobMsgDelete(j Job) {
if j.Trigger != 0 && p.MsgTypeID64 != 0 {
logOnError(err, "jobMsgDel : getObjMsg msg")
id, err := getObjSubTypeId(j.Trigger)
logOnError(err, "jobMsgDelete : getObjSubTypeId("+strconv.FormatInt(j.Trigger, 10)+")")
if id == p.MsgTypeID64 {
if p.Delay == 0 {
obj, err := getObjMsg(j.Trigger)
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
} else {
p.ObjMsgID64 = j.Trigger
@ -614,6 +616,7 @@ func jobMsgDelete(j Job) {
} else if p.ObjMsgID64 != 0 {
if p.Delay == 0 {
obj, err := getObjMsg(j.Trigger)
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
} else {
b, _ := json.Marshal(p)