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
1 changed files with 2 additions and 0 deletions

View File

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