test job msg del
This commit is contained in:
parent
34edcd5fc0
commit
c2d51ce662
2
bot.go
2
bot.go
@ -941,7 +941,7 @@ func botGWithdraw(m *tb.Message) {
|
|||||||
TGCmdQueue <- c
|
TGCmdQueue <- c
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
userID64 := clt.TGUserID64
|
// userID64 := clt.TGUserID64
|
||||||
clt.Mux.Unlock()
|
clt.Mux.Unlock()
|
||||||
|
|
||||||
r := regexp.MustCompile("^(( )*[a-z0-9]+ [0-9]+( )*)+$")
|
r := regexp.MustCompile("^(( )*[a-z0-9]+ [0-9]+( )*)+$")
|
||||||
|
3
job.go
3
job.go
@ -599,9 +599,11 @@ func jobMsgDelete(j Job) {
|
|||||||
if j.Trigger != 0 && p.MsgTypeID64 != 0 {
|
if j.Trigger != 0 && p.MsgTypeID64 != 0 {
|
||||||
logOnError(err, "jobMsgDel : getObjMsg msg")
|
logOnError(err, "jobMsgDel : getObjMsg msg")
|
||||||
id, err := getObjSubTypeId(j.Trigger)
|
id, err := getObjSubTypeId(j.Trigger)
|
||||||
|
logOnError(err, "jobMsgDelete : getObjSubTypeId("+strconv.FormatInt(j.Trigger, 10)+")")
|
||||||
if id == p.MsgTypeID64 {
|
if id == p.MsgTypeID64 {
|
||||||
if p.Delay == 0 {
|
if p.Delay == 0 {
|
||||||
obj, err := getObjMsg(j.Trigger)
|
obj, err := getObjMsg(j.Trigger)
|
||||||
|
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
|
||||||
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
|
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
|
||||||
} else {
|
} else {
|
||||||
p.ObjMsgID64 = j.Trigger
|
p.ObjMsgID64 = j.Trigger
|
||||||
@ -614,6 +616,7 @@ 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(j.Trigger)
|
||||||
|
logOnError(err, "jobMsgDelete : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
|
||||||
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
|
clientDelTGMsg(j.UserID64, obj.ID64, obj.ChatID64)
|
||||||
} else {
|
} else {
|
||||||
b, _ := json.Marshal(p)
|
b, _ := json.Marshal(p)
|
||||||
|
Loading…
Reference in New Issue
Block a user