From 9300ca721ac2a2d93ce99871bdf4e9916092da9b Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 29 Dec 2019 11:06:34 +0800 Subject: [PATCH] fix --- main.go | 2 +- td.go | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 863e4ec..e23c561 100644 --- a/main.go +++ b/main.go @@ -65,6 +65,6 @@ func main() { ownUserID32 = OwnUserID(client) ownUserID64 = int64(OwnUserID(client)) - getHistory(client, &chtwrsID64) + getHistory(client, chtwrsID64) } diff --git a/td.go b/td.go index b76a7c3..94df9a2 100644 --- a/td.go +++ b/td.go @@ -10,7 +10,7 @@ import ( "github.com/Arman92/go-tdlib" ) -func getHistory(c *tdlib.Client, chatID64 *int64) { +func getHistory(c *tdlib.Client, chatID64 int64) { var msgCount int32 = 0 var msgParsed int32 = 0 var loopOverflow int32 = 0 @@ -19,9 +19,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64) { var chat int64 var m ChatWarsMessage - chat = *chatID64 - - chatDetails, err := c.GetChat(chat) + chatDetails, err := c.GetChat(chatID64) failOnError(err, "getHistory : GetChat") fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title)