update stash

This commit is contained in:
shoopea 2020-06-21 13:03:06 +02:00
parent b5c8c211f8
commit f44f64db31

6
job.go
View File

@ -2099,14 +2099,14 @@ func jobGetStash(j Job) {
p.ClientID64 = p.ClientID64[:len(p.ClientID64)-1] p.ClientID64 = p.ClientID64[:len(p.ClientID64)-1]
} }
} }
p.Trigger = 0 j.Trigger = 0
} else if rule.MsgTypeID64 == cacheObjSubType[`msg_busy`] { } else if rule.MsgTypeID64 == cacheObjSubType[`msg_busy`] {
p.CleanupMsgs = append(p.CleanupMsg, *m) p.CleanupMsgs = append(p.CleanupMsg, *m)
} }
} }
} }
if len(p.ClientID64) > 0 && p.Trigger == 0 { if len(p.ClientID64) > 0 && j.Trigger == 0 {
var ( var (
userID64 int64 = 0 userID64 int64 = 0
busyUntil time.Time = time.Now().UTC() busyUntil time.Time = time.Now().UTC()
@ -2128,7 +2128,7 @@ func jobGetStash(j Job) {
clientSendCWMsgDelay(userID64, "⚖Exchange", time.Now().UTC().Add(-2*time.Second).Sub(busyUntil)) clientSendCWMsgDelay(userID64, "⚖Exchange", time.Now().UTC().Add(-2*time.Second).Sub(busyUntil))
} }
if len(p.ClientID64) == 0 && p.Trigger == 0 { if len(p.ClientID64) == 0 && j.Trigger == 0 {
for _, m := range p.CleanupMsg { for _, m := range p.CleanupMsg {
clientDelTGMsg(m.TGUserID64, m.ID64, m.ChatID64) clientDelTGMsg(m.TGUserID64, m.ID64, m.ChatID64)
} }