fix
This commit is contained in:
parent
a368148915
commit
a49d2fe73d
4
td.go
4
td.go
@ -72,14 +72,14 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
|||||||
var msgCount int32 = 0
|
var msgCount int32 = 0
|
||||||
var lastMsgTime time.Time = time.Now()
|
var lastMsgTime time.Time = time.Now()
|
||||||
|
|
||||||
if &chatID64 == 0 {
|
if *chatID64 == 0 {
|
||||||
chat := user_chtwrsbot
|
chat := user_chtwrsbot
|
||||||
} else {
|
} else {
|
||||||
chat = chatID64
|
chat = chatID64
|
||||||
}
|
}
|
||||||
|
|
||||||
for lastMsgID64 >= 0 {
|
for lastMsgID64 >= 0 {
|
||||||
msgs, err := c.GetChatHistory(c, lastMsgID64, 0, 10, false)
|
msgs, err := c.GetChatHistory(chat, lastMsgID64, 0, 10, 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