~emersion/soju-dev

Request invite-notify to upstreams v1 SUPERSEDED

Hubert Hirtz: 1
 Request invite-notify to upstreams

 1 files changed, 4 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/19616/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Request invite-notify to upstreams Export this patch

... and do not forward INVITEs to downstreams that do not support the
capability.
---
 upstream.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/upstream.go b/upstream.go
index 6cf035d..61aa2df 100644
--- a/upstream.go
+++ b/upstream.go
@@ -27,6 +27,7 @@ var permanentUpstreamCaps = map[string]bool{
	"away-notify":      true,
	"batch":            true,
	"extended-join":    true,
	"invite-notify":    true,
	"labeled-response": true,
	"message-tags":     true,
	"multi-prefix":     true,
@@ -1341,6 +1342,9 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
		}

		uc.forEachDownstream(func(dc *downstreamConn) {
			if !dc.caps["invite-notify"] {
				return
			}
			dc.SendMessage(&irc.Message{
				Prefix:  dc.marshalUserPrefix(uc.network, msg.Prefix),
				Command: "INVITE",
-- 
2.30.0