mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
implement FAIL CHATHISTORY INVALID_TARGET
This commit is contained in:
parent
8bb867d3dc
commit
9374a75c7a
1 changed files with 1 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue