From 8c676eeac24e3a75f222d0d5b18ac04e3a5c14d7 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 9 May 2019 18:40:35 +0800 Subject: [PATCH] test --- td.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/td.go b/td.go index 56af8ba..d5ede9e 100644 --- a/td.go +++ b/td.go @@ -43,8 +43,7 @@ func ListenCW(c *tdlib.Client) { Text: txt, } - i, err := strconv.ParseInt(int64(updateMsg.Message.Date), 10, 64) - m.Date = time.Unix(i, 0) + m.Date = time.Unix(int64(updateMsg.Message.Date), 0) MQCWMsgQueue <- m @@ -122,8 +121,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { ChatID64: msg.ChatID, Text: msg.Content.(*tdlib.MessageText).Text.Text, } - i, err := strconv.ParseInt(int64(msg.Date), 10, 64) - m.Date = time.Unix(i, 0) + m.Date = time.Unix(int64(msg.Date), 0) } else { if msg.ForwardInfo.GetMessageForwardInfoEnum() == tdlib.MessageForwardedFromUserType { m = ChatWarsMessage{ @@ -133,8 +131,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { ChatID64: 0, Text: msg.Content.(*tdlib.MessageText).Text.Text, } - i, err := strconv.ParseInt(int64(msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date), 10, 64) - m.Date = time.Unix(i, 0) + m.Date = time.Unix(int64(msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date), 0) } else { m = ChatWarsMessage{