mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 04:07:07 +00:00
Always set "complete" attribute for empty history responses
This commit is contained in:
parent
4fb3886aab
commit
17f617e15d
1 changed files with 3 additions and 3 deletions
|
|
@ -2401,9 +2401,6 @@ func (c *Client) GetMessagesBetween(chatID, fromMessageId, lastMessageId int64,
|
||||||
Limit: reqLimit,
|
Limit: reqLimit,
|
||||||
})
|
})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if len(newMessages.Messages) == 0 {
|
|
||||||
complete = true
|
|
||||||
}
|
|
||||||
if limit < 0 {
|
if limit < 0 {
|
||||||
fromPos := -1
|
fromPos := -1
|
||||||
for i, message := range newMessages.Messages {
|
for i, message := range newMessages.Messages {
|
||||||
|
|
@ -2433,6 +2430,9 @@ func (c *Client) GetMessagesBetween(chatID, fromMessageId, lastMessageId int64,
|
||||||
}
|
}
|
||||||
messages = append(messages, message)
|
messages = append(messages, message)
|
||||||
}
|
}
|
||||||
|
if len(messages) == 0 {
|
||||||
|
complete = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue