From 33b17a705c40e2bdc80a94d69cd35d8c35dc7494 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 10 Jun 2019 17:14:03 +0800 Subject: [PATCH] test --- bot.go | 2 +- workers.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.go b/bot.go index a11f599..1f2d68d 100644 --- a/bot.go +++ b/bot.go @@ -300,7 +300,7 @@ func botMsgLoad(m *tb.Message) { } TGCmdQueue <- c - err := UnzipMessages(buf.Bytes()) + err = UnzipMessages(buf.Bytes()) logOnError(err, "botMsgLoad : UnzipMessages") c = TGCommand{ diff --git a/workers.go b/workers.go index 02530c0..bd9b6d3 100644 --- a/workers.go +++ b/workers.go @@ -6,6 +6,7 @@ import ( "log" "math/rand" "strconv" + "strings" "time" "github.com/streadway/amqp" @@ -249,7 +250,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) { j, err := json.Marshal(c) logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : Marshal(c)") log.Printf("TGCmdWorker["+strconv.Itoa(id)+"] : new command.\n%s\n", string(j)) - opt := SendOptions{} + opt := tb.SendOptions{} switch c.ParseMode { case cmdParseModePlain: opt.ParseMode = tb.ModeDefault