update
This commit is contained in:
parent
9300ca721a
commit
c86d795e79
6
td.go
6
td.go
@ -19,13 +19,15 @@ func getHistory(c *tdlib.Client, chatID64 int64) {
|
|||||||
var chat int64
|
var chat int64
|
||||||
var m ChatWarsMessage
|
var m ChatWarsMessage
|
||||||
|
|
||||||
|
fmt.Printf("Getting details for chatID64 %d ...\n", chatID64)
|
||||||
|
|
||||||
chatDetails, err := c.GetChat(chatID64)
|
chatDetails, err := c.GetChat(chatID64)
|
||||||
failOnError(err, "getHistory : GetChat")
|
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", chatID64, chatDetails.Title)
|
||||||
|
|
||||||
for lastParsedID64 >= 0 {
|
for lastParsedID64 >= 0 {
|
||||||
prevLastParsedID64 := lastParsedID64
|
prevLastParsedID64 := lastParsedID64
|
||||||
msgs, err := c.GetChatHistory(chat, lastParsedID64, 0, 99, false)
|
msgs, err := c.GetChatHistory(chatID64, lastParsedID64, 0, 99, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err.Error() == "timeout" {
|
if err.Error() == "timeout" {
|
||||||
logOnError(err, "Waiting....")
|
logOnError(err, "Waiting....")
|
||||||
|
Loading…
Reference in New Issue
Block a user