Selaa lähdekoodia

implement FAIL CHATHISTORY INVALID_TARGET

tags/v2.4.0
Shivaram Lingamneni 3 vuotta sitten
vanhempi
commit
9374a75c7a
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1
    3
      irc/handlers.go

+ 1
- 3
irc/handlers.go Näytä tiedosto

@@ -556,9 +556,7 @@ func chathistoryHandler(server *Server, client *Client, msg ircmsg.IrcMessage, r
556 556
 		} else if err == utils.ErrInvalidParams {
557 557
 			rb.Add(nil, server.name, "FAIL", "CHATHISTORY", "INVALID_PARAMS", msg.Params[0], client.t("Invalid parameters"))
558 558
 		} else if sequence == nil {
559
-			// send an empty batch as per the spec
560
-			batchID := rb.StartNestedHistoryBatch(utils.SafeErrorParam(target))
561
-			rb.EndNestedBatch(batchID)
559
+			rb.Add(nil, server.name, "FAIL", "CHATHISTORY", "INVALID_TARGET", utils.SafeErrorParam(target), client.t("Messages could not be retrieved"))
562 560
 		} else if err != nil {
563 561
 			rb.Add(nil, server.name, "FAIL", "CHATHISTORY", "MESSAGE_ERROR", msg.Params[0], client.t("Messages could not be retrieved"))
564 562
 		} else {

Loading…
Peruuta
Tallenna