3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 20:09:41 +01:00

Merge pull request #2067 from slingamn/issue2066

fix #2066
This commit is contained in:
Shivaram Lingamneni 2023-05-30 23:12:19 -07:00 committed by GitHub
commit 3e68694760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -655,8 +655,10 @@ func chathistoryHandler(server *Server, client *Client, msg ircmsg.Message, rb *
} else { } else {
// successful responses are sent as a chathistory or history batch // successful responses are sent as a chathistory or history batch
if listTargets { if listTargets {
if rb.session.capabilities.Has(caps.Batch) { // #2066
batchID := rb.StartNestedBatch("draft/chathistory-targets") batchID := rb.StartNestedBatch("draft/chathistory-targets")
defer rb.EndNestedBatch(batchID) defer rb.EndNestedBatch(batchID)
}
for _, target := range targets { for _, target := range targets {
name := server.UnfoldName(target.CfName) name := server.UnfoldName(target.CfName)
rb.Add(nil, server.name, "CHATHISTORY", "TARGETS", name, rb.Add(nil, server.name, "CHATHISTORY", "TARGETS", name,