This commit is contained in:
shoopea 2019-05-16 10:21:04 +08:00
parent 6766c5a22b
commit 5a8db5f93d
2 changed files with 4 additions and 4 deletions

6
bot.go
View File

@ -88,7 +88,7 @@ func botMsgRescan(m *tb.Message) (string, error) {
}
b, _ := json.Marshal(p)
log.Printf("botMsgRescan : json : %s\n", string(b))
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanMsg, time.Now(), b)
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanMsg, int64(m.Sender.ID), time.Now(), b)
logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)")
if err != nil {
return "Error scheduling the rescan for msg #" + m.Payload, nil
@ -106,7 +106,7 @@ func botMsgRescan(m *tb.Message) (string, error) {
}
b, _ := json.Marshal(p)
log.Printf("botMsgRescan : json : %s\n", string(b))
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanAllMsg, time.Now(), b)
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanAllMsg, int64(m.Sender.ID), time.Now(), b)
logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)")
if err != nil {
return "Error scheduling the rescan for all msg", nil
@ -130,7 +130,7 @@ func botMsgRescanAll(m *tb.Message) (string, error) {
}
b, _ := json.Marshal(p)
log.Printf("botMsgRescan : json : %s\n", string(b))
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanAllMsg, time.Now(), b)
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanAllMsg, int64(m.Sender.ID), time.Now(), b)
logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)")
if err != nil {
return "Error scheduling the rescan for all msg", nil

View File

@ -47,7 +47,7 @@ var (
cfg Config
MQCWMsgQueue chan ChatWarsMessage
SQLMsgIdentifyQueue chan int64
TGMsgQueue chan TGCommand
TGCmdQueue chan TGCommand
msgParsingRules map[int]MessageParsingRule
)