From 0304c06ca03dc4a6977ef788651eb3235d86138d Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 9 Jun 2019 15:18:03 +0800 Subject: [PATCH] test --- workers.go | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/workers.go b/workers.go index de2a664..a4af0e0 100644 --- a/workers.go +++ b/workers.go @@ -257,18 +257,17 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) { } _, err := b.Reply(&m, c.Text) logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyMsg") - /* - case commandReplyDocument: - ch := tb.Chat{ - ID: c.FromChatID64, - } - m := tb.Message{ - ID: int(c.FromMsgID64), - Chat: &ch, - } - _, err := c.Document.Send(b, m, nil) - logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyDocument") - */ + case commandReplyDocument: + ch := tb.Chat{ + ID: c.FromChatID64, + } + m := tb.Message{ + ID: int(c.FromMsgID64), + Chat: &ch, + } + _, err := b.Reply(&m, c.Document) + //_, err := c.Document.Send(b, m, nil) + logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyDocument") case commandSendMsg: if c.ToChatID64 != 0 { ch := tb.Chat{