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.

git-svn-id: file:///srv/svn/repo/suika/trunk@427 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
hubert 2020-11-20 10:37:43 +00:00
parent 55806cb0b0
commit 3cabab7275

View File

@ -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,