This commit is contained in:
shoopea 2019-05-06 11:29:50 +08:00
parent 033c667884
commit 7a2e1bebfe

3
td.go
View File

@ -83,10 +83,13 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
if *senderUserID64 != 0 {
userDetails, err := c.GetUser(int32(*senderUserID64))
failOnError(err, "getHistory : GetUser")
chatDetails, err := c.GetChat(chat)
failOnError(err, "getHistory : GetChat")
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)
failOnError(err, "getHistory : GetChat")
fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title)
}