diff --git a/bot.go b/bot.go index 9210331..86b44e8 100644 --- a/bot.go +++ b/bot.go @@ -5,7 +5,6 @@ import ( "fmt" tb "gopkg.in/tucnak/telebot.v2" "regexp" - "strconv" "time" ) @@ -96,7 +95,7 @@ func botMsgRescan(m *tb.Message) (string, error) { r := regexp.MustCompile("^[0-9]+$") if r.MatchString(m.Payload) { p := JobPayloadRescanMsg{} - fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.id = %d and o.obj_type_id = %d and o.obj_sub_type_id = %d;", m.Payload, objTypeMessage, objSubTypeMessageUnprocessed) + fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.id = %d and o.obj_type_id = %d and o.obj_sub_type_id = %d;", m.Payload, objTypeMessage, objSubTypeMessageUnknown) b, _ := json.Marshal(p) err := createJob(objSubTypeJobRescanMsg, 2, time.Now(), b) logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)") @@ -110,7 +109,7 @@ func botMsgRescan(m *tb.Message) (string, error) { r = regexp.MustCompile("^all$") if r.MatchString(m.Payload) { p := JobPayloadRescanMsg{} - fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnprocessed) + fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnknown) b, _ := json.Marshal(p) err := createJob(objSubTypeJobRescanMsg, 3, time.Now(), b) logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)")