test
This commit is contained in:
parent
6a4cf19a0f
commit
c20116fa44
9
td.go
9
td.go
@ -138,8 +138,13 @@ func getHistory(c *tdlib.Client) {
|
||||
for lastMsgID64 >= 0 {
|
||||
msgs, err := c.GetChatHistory(user_chtwrsbot, lastMsgID64, 0, 50, false)
|
||||
if err != nil {
|
||||
logOnError(err, "Cannot get history")
|
||||
lastMsgID64 = -1
|
||||
if err.Error() == "timeout" {
|
||||
logOnError(err, "Waiting...")
|
||||
fmt.Printf("Waiting (%d messages retrieved).\n", msgCount)
|
||||
} else {
|
||||
logOnError(err, "Cannot get history")
|
||||
lastMsgID64 = -1
|
||||
}
|
||||
} else {
|
||||
for _, msg := range msgs.Messages {
|
||||
switch msg.Content.GetMessageContentEnum() {
|
||||
|
Loading…
Reference in New Issue
Block a user