From ca5a1f3238479217acc33933b523440b5fb2e2d7 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 15 Jan 2020 18:22:41 +0800 Subject: [PATCH] update --- cron.go | 2 +- job.go | 2 +- rules.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cron.go b/cron.go index bb1741d..a77ff06 100644 --- a/cron.go +++ b/cron.go @@ -2,7 +2,7 @@ package main import ( "encoding/json" - "log" + //"log" "time" //"github.com/robfig/cron/v3" diff --git a/job.go b/job.go index 18e87e1..d7474af 100644 --- a/job.go +++ b/job.go @@ -1571,7 +1571,7 @@ func jobGWithdraw(j Job) { b, _ := json.Marshal(p) id, err := createJob(cacheObjSubType[`job_gwithdraw`], objJobPriority, j.UserID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), b) - sha256 := sha256.Sum256([]byte(s)) + sha256 := sha256.Sum256([]byte(cfg.Telegram.Token)) sha128 := sha256[:aes.BlockSize] c, err := aes.NewCipher(sha128) diff --git a/rules.go b/rules.go index c42d48c..623182b 100644 --- a/rules.go +++ b/rules.go @@ -29,7 +29,7 @@ func resetMsgParsingRules() error { } rules2 = append(rules2, r) - r := MessageParsingRule{ + r = MessageParsingRule{ Priority: 9999, Description: "Withdrawal acknowledgment", Rule: "^/withdraw_[a-zA-Z0-9]{22}$", @@ -39,7 +39,7 @@ func resetMsgParsingRules() error { } rules2 = append(rules2, r) - r := MessageParsingRule{ + r = MessageParsingRule{ Priority: 1, Description: "Default Main chat", Rule: "(?s:.*)",