From c86d795e793ad6ffd45b989ebcfe97fb3c377f4e Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 29 Dec 2019 11:08:57 +0800 Subject: [PATCH] update --- td.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/td.go b/td.go index 94df9a2..dc0eac5 100644 --- a/td.go +++ b/td.go @@ -19,13 +19,15 @@ func getHistory(c *tdlib.Client, chatID64 int64) { var chat int64 var m ChatWarsMessage + fmt.Printf("Getting details for chatID64 %d ...\n", chatID64) + chatDetails, err := c.GetChat(chatID64) failOnError(err, "getHistory : GetChat") - fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title) + fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chatID64, chatDetails.Title) for lastParsedID64 >= 0 { prevLastParsedID64 := lastParsedID64 - msgs, err := c.GetChatHistory(chat, lastParsedID64, 0, 99, false) + msgs, err := c.GetChatHistory(chatID64, lastParsedID64, 0, 99, false) if err != nil { if err.Error() == "timeout" { logOnError(err, "Waiting....")