From be6cc279810dffdabb4804d8a226b0623fe4e9f9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 28 Mar 2023 18:48:47 +0200 Subject: [PATCH] downstream: set CLIENTTAGDENY=* when upstream is missing message-tags --- downstream.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/downstream.go b/downstream.go index a38ac9e..bdcc8a2 100644 --- a/downstream.go +++ b/downstream.go @@ -1473,6 +1473,12 @@ func (dc *downstreamConn) welcome(ctx context.Context) error { } if uc := dc.upstream(); uc != nil { + // If upstream doesn't support message-tags, indicate that we'll drop + // all of them + if _, ok := uc.isupport["CLIENTTAGDENY"]; !ok && !uc.caps.IsEnabled("message-tags") { + isupport = append(isupport, "CLIENTTAGDENY=*") + } + for k := range passthroughIsupport { v, ok := uc.isupport[k] if !ok {