diff --git a/td.go b/td.go index 40df058..3c143b5 100644 --- a/td.go +++ b/td.go @@ -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) }