From 9374a75c7a820df5c5f42c47f37f65da42047ece Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 3 Nov 2020 20:59:03 -0500 Subject: [PATCH 1/2] implement FAIL CHATHISTORY INVALID_TARGET --- irc/handlers.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/irc/handlers.go b/irc/handlers.go index fd6581fb..ff69b241 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -556,9 +556,7 @@ func chathistoryHandler(server *Server, client *Client, msg ircmsg.IrcMessage, r } else if err == utils.ErrInvalidParams { rb.Add(nil, server.name, "FAIL", "CHATHISTORY", "INVALID_PARAMS", msg.Params[0], client.t("Invalid parameters")) } else if sequence == nil { - // send an empty batch as per the spec - batchID := rb.StartNestedHistoryBatch(utils.SafeErrorParam(target)) - rb.EndNestedBatch(batchID) + rb.Add(nil, server.name, "FAIL", "CHATHISTORY", "INVALID_TARGET", utils.SafeErrorParam(target), client.t("Messages could not be retrieved")) } else if err != nil { rb.Add(nil, server.name, "FAIL", "CHATHISTORY", "MESSAGE_ERROR", msg.Params[0], client.t("Messages could not be retrieved")) } else { From e67995bea70cf44090313135026fd56e04da7462 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 4 Nov 2020 01:52:14 -0500 Subject: [PATCH 2/2] bump irctest --- irctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irctest b/irctest index 512b4bd7..b43e1278 160000 --- a/irctest +++ b/irctest @@ -1 +1 @@ -Subproject commit 512b4bd74d685aa7ff978668d2c6a124416cebd2 +Subproject commit b43e1278057113041ba51ced58571a2ad8dacb5c