From f1e4d93ff2890ab325397766be88bd1be1c083a8 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 6 May 2019 11:26:15 +0800 Subject: [PATCH] debug --- td.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/td.go b/td.go index 60bfff9..1d43f3b 100644 --- a/td.go +++ b/td.go @@ -81,7 +81,14 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { chat = *chatID64 } - fmt.Printf("Exporting historic messages for chat %d from user %d ...\n", chat, *senderUserID64) + if historySenderUserID64 != 0 { + userDetails, err := c.GetUser(senderUserID) + chatDetails, err := c.GetChat(chat) + fmt.Printf("Exporting historic messages for chat %d (%s) from user %d (%s)...\n", chat, chatDetails.Title, *senderUserID64, userDetails.Username) + } else { + chatDetails, err := c.GetChat(chat) + fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title) + } for lastParsedID64 >= 0 { msgs, err := c.GetChatHistory(chat, lastParsedID64, 0, 99, false)