CHATHISTORY with no results SHOULD send an empty batch

This commit is contained in:
Shivaram Lingamneni 2020-02-20 23:47:13 -05:00
parent 98a7b45d96
commit 03378da81b
4 changed files with 15 additions and 16 deletions

View file

@ -124,7 +124,7 @@ func zncPlayPrivmsgs(client *Client, rb *ResponseBuffer, after, before time.Time
}
zncMax := client.server.Config().History.ZNCMax
items, _, err := sequence.Between(history.Selector{Time: after}, history.Selector{Time: before}, zncMax)
if err == nil {
if err == nil && len(items) != 0 {
client.replayPrivmsgHistory(rb, items, "", true)
}
}