1
0
Fork 0
forked from External/ergo

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

@ -525,7 +525,7 @@ func chathistoryHandler(server *Server, client *Client, msg ircmsg.IrcMessage, r
var err error
defer func() {
// successful responses are sent as a chathistory or history batch
if err == nil && 0 < len(items) {
if err == nil {
if channel != nil {
channel.replayHistoryItems(rb, items, false)
} else {
@ -958,7 +958,7 @@ func historyHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *R
items, _, err = sequence.Between(start, end, limit)
}
if err == nil {
if err == nil && len(items) != 0 {
if channel != nil {
channel.replayHistoryItems(rb, items, false)
} else {