From a49d2fe73dc4420977a3b2c43ac4b2ce9d3e5cbe Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 4 May 2019 18:00:54 +0800 Subject: [PATCH] fix --- td.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td.go b/td.go index 77b13e6..1c45552 100644 --- a/td.go +++ b/td.go @@ -72,14 +72,14 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { var msgCount int32 = 0 var lastMsgTime time.Time = time.Now() - if &chatID64 == 0 { + if *chatID64 == 0 { chat := user_chtwrsbot } else { chat = chatID64 } for lastMsgID64 >= 0 { - msgs, err := c.GetChatHistory(c, lastMsgID64, 0, 10, false) + msgs, err := c.GetChatHistory(chat, lastMsgID64, 0, 10, false) if err != nil { if err.Error() == "timeout" { logOnError(err, "Waiting...")