From 71ee2eb14b53431218e3c1232b697ebd2ef12255 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 4 May 2019 18:37:43 +0800 Subject: [PATCH] test --- td.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/td.go b/td.go index b895a99..82c50ae 100644 --- a/td.go +++ b/td.go @@ -93,7 +93,6 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { lastMsgID64 = -1 } } else if msgs.TotalCount > 0 { - fmt.Printf("Exported %d messages so far.\n", msgCount) for _, msg := range msgs.Messages { switch msg.Content.GetMessageContentEnum() { case tdlib.MessageTextType: @@ -105,15 +104,13 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { ChatID64: msg.ChatID, Text: msg.Content.(*tdlib.MessageText).Text.Text, } - fmt.Printf("straight msg id : %d\n", m.ID64) } else { if msg.ForwardInfo.GetMessageForwardInfoEnum() == tdlib.MessageForwardedFromUserType { - fmt.Printf("forwarded msg date : %d\n", msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date) m = ChatWarsMessage{ SenderUserID64: int64(msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).SenderUserID), Date: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date, - ID64: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).ForwardedFromMessageID, - ChatID64: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).ForwardedFromChatID, + ID64: msg.ID, + ChatID64: 0, Text: msg.Content.(*tdlib.MessageText).Text.Text, } } else {