From 43d99a09ba823b558741948d311fc5fb5f96a969 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 9 Jun 2019 00:17:02 +0800 Subject: [PATCH] testtest --- bot.go | 9 +++++++++ msg.go | 1 + 2 files changed, 10 insertions(+) diff --git a/bot.go b/bot.go index a78c10c..bd4ec91 100644 --- a/bot.go +++ b/bot.go @@ -207,6 +207,15 @@ func botMsgExportAll(m *tb.Message) { TGCmdQueue <- c return + } else { + text := fmt.Sprintf("Document size : %d bytes.", len(b)) + c := TGCommand{ + Type: commandReplyMsg, + Text: text, + FromMsgID64: int64(m.ID), + FromChatID64: m.Chat.ID, + } + TGCmdQueue <- c } d := tb.Document{File: tb.FromReader(bytes.NewReader(b))} diff --git a/msg.go b/msg.go index 27a9c53..dc09641 100644 --- a/msg.go +++ b/msg.go @@ -292,6 +292,7 @@ func zipMessages() ([]byte, error) { } } + bkp.Messages = msgs b, err := json.Marshal(bkp) logOnError(err, "exportMessages : Marshal")