~emersion/soju-dev

Don't send TAGMSG to upstreams that don't support it v1 APPLIED

Hubert Hirtz: 1
 Don't send TAGMSG to upstreams that don't support it

 1 files changed, 3 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/15183/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Don't send TAGMSG to upstreams that don't support it Export this patch

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,
-- 
2.26.2
LGTM, thanks!