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....")