This commit is contained in:
shoopea 2019-06-09 00:17:02 +08:00
parent 99e7a38ad8
commit 43d99a09ba
2 changed files with 10 additions and 0 deletions

9
bot.go
View File

@ -207,6 +207,15 @@ func botMsgExportAll(m *tb.Message) {
TGCmdQueue <- c TGCmdQueue <- c
return 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))} d := tb.Document{File: tb.FromReader(bytes.NewReader(b))}

1
msg.go
View File

@ -292,6 +292,7 @@ func zipMessages() ([]byte, error) {
} }
} }
bkp.Messages = msgs bkp.Messages = msgs
b, err := json.Marshal(bkp) b, err := json.Marshal(bkp)
logOnError(err, "exportMessages : Marshal") logOnError(err, "exportMessages : Marshal")