err
This commit is contained in:
parent
033c667884
commit
7a2e1bebfe
3
td.go
3
td.go
@ -83,10 +83,13 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
|||||||
|
|
||||||
if *senderUserID64 != 0 {
|
if *senderUserID64 != 0 {
|
||||||
userDetails, err := c.GetUser(int32(*senderUserID64))
|
userDetails, err := c.GetUser(int32(*senderUserID64))
|
||||||
|
failOnError(err, "getHistory : GetUser")
|
||||||
chatDetails, err := c.GetChat(chat)
|
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)
|
fmt.Printf("Exporting historic messages for chat %d (%s) from user %d (%s)...\n", chat, chatDetails.Title, *senderUserID64, userDetails.Username)
|
||||||
} else {
|
} else {
|
||||||
chatDetails, err := c.GetChat(chat)
|
chatDetails, err := c.GetChat(chat)
|
||||||
|
failOnError(err, "getHistory : GetChat")
|
||||||
fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title)
|
fmt.Printf("Exporting historic messages for chat %d (%s) ...\n", chat, chatDetails.Title)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user