From e4d2ddb377b63f24431fcf48b66bdf19f9b33821 Mon Sep 17 00:00:00 2001 From: Hubert Hirtz Date: Fri, 20 Nov 2020 11:19:51 +0100 Subject: [PATCH] Don't send TAGMSG to upstreams that don't support it TAGMSG are (in current specs and drafts from IRCv3) only used for client tags. These are optional information by design (since they are not distributed to all users), therefore it is preferable to discard them accordingly to upstream, instead of waiting for all upstreams to support the capability to advertise it. --- downstream.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/downstream.go b/downstream.go index 6352f23..6a9cf55 100644 --- a/downstream.go +++ b/downstream.go @@ -1553,6 +1553,9 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error { if err != nil { return err } + if _, ok := uc.caps["message-tags"]; !ok { + continue + } uc.SendMessageLabeled(dc.id, &irc.Message{ Tags: tags,