forked from External/ergo
clean up nested batch logic
This commit is contained in:
parent
d082ec7ab9
commit
38a6d17ee5
5 changed files with 9 additions and 19 deletions
|
|
@ -655,10 +655,8 @@ func chathistoryHandler(server *Server, client *Client, msg ircmsg.Message, rb *
|
|||
} else {
|
||||
// successful responses are sent as a chathistory or history batch
|
||||
if listTargets {
|
||||
if rb.session.capabilities.Has(caps.Batch) { // #2066
|
||||
batchID := rb.StartNestedBatch("draft/chathistory-targets")
|
||||
defer rb.EndNestedBatch(batchID)
|
||||
}
|
||||
batchID := rb.StartNestedBatch(caps.ChathistoryTargetsBatchType)
|
||||
defer rb.EndNestedBatch(batchID)
|
||||
for _, target := range targets {
|
||||
name := server.UnfoldName(target.CfName)
|
||||
rb.Add(nil, server.name, "CHATHISTORY", "TARGETS", name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue