test
This commit is contained in:
parent
23f4120d71
commit
ae70c7091a
4
td.go
4
td.go
@ -101,7 +101,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
msgs, err := c.GetChatHistory(chat, lastParsedID64, 0, 33, false)
|
||||
if err != nil {
|
||||
if err.Error() == "timeout" {
|
||||
logOnError(err, "Waiting...")
|
||||
logOnError(err, "Waiting....")
|
||||
fmt.Printf("Timeout : %d messages retrieved out of %d dating back %s (%d) ...\n", msgCount, msgParsed, lastParsedTime.Format(time.RFC3339), lastParsedID64)
|
||||
time.Sleep(5 * time.Second)
|
||||
} else {
|
||||
@ -166,6 +166,8 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
// we should be at the end !
|
||||
lastParsedID64 = -1
|
||||
} else {
|
||||
logOnError(err, "Overflow ...")
|
||||
fmt.Printf("Overflow : %d messages retrieved out of %d dating back %s (%d) ...\n", msgCount, msgParsed, lastParsedTime.Format(time.RFC3339), lastParsedID64)
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user