Keep batch tag for downstreams with batch cap

On upstreams without message-tags support, we do not advertise
message-tags anymore. Still, we want to send the batch tag when the
client explicitly requested it.

This fixes a critical issue where we drop the batch tag on chathistory
messages for upstreams that do not support message-tags.
This commit is contained in:
delthas 2022-04-12 17:53:20 +02:00 committed by Simon Ser
parent 683cfe0615
commit b790db1423

View File

@ -558,6 +558,8 @@ func (dc *downstreamConn) SendMessage(msg *irc.Message) {
supported = dc.caps.IsEnabled("server-time") supported = dc.caps.IsEnabled("server-time")
case "account": case "account":
supported = dc.caps.IsEnabled("account") supported = dc.caps.IsEnabled("account")
case "batch":
supported = dc.caps.IsEnabled("batch")
} }
if !supported { if !supported {
delete(msg.Tags, name) delete(msg.Tags, name)