Преглед изворни кода

fix #2066

CHATHISTORY TARGETS response should not be in a batch unless the client has
explicitly requested the batch cap.
tags/v2.12.0-rc1
Shivaram Lingamneni пре 1 година
родитељ
комит
00cfe98461
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4
    2
      irc/handlers.go

+ 4
- 2
irc/handlers.go Прегледај датотеку

655
 		} else {
655
 		} else {
656
 			// successful responses are sent as a chathistory or history batch
656
 			// successful responses are sent as a chathistory or history batch
657
 			if listTargets {
657
 			if listTargets {
658
-				batchID := rb.StartNestedBatch("draft/chathistory-targets")
659
-				defer rb.EndNestedBatch(batchID)
658
+				if rb.session.capabilities.Has(caps.Batch) { // #2066
659
+					batchID := rb.StartNestedBatch("draft/chathistory-targets")
660
+					defer rb.EndNestedBatch(batchID)
661
+				}
660
 				for _, target := range targets {
662
 				for _, target := range targets {
661
 					name := server.UnfoldName(target.CfName)
663
 					name := server.UnfoldName(target.CfName)
662
 					rb.Add(nil, server.name, "CHATHISTORY", "TARGETS", name,
664
 					rb.Add(nil, server.name, "CHATHISTORY", "TARGETS", name,

Loading…
Откажи
Сачувај