~emersion/soju-dev

Fix CAP LIST listing disabled capabilities v1 APPLIED

Hubert Hirtz: 1
 Fix CAP LIST listing disabled capabilities

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

[PATCH] Fix CAP LIST listing disabled capabilities Export this patch

---
 downstream.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/downstream.go b/downstream.go
index ef9da6e..a4f2da8 100644
--- a/downstream.go
+++ b/downstream.go
@@ -617,8 +617,10 @@ func (dc *downstreamConn) handleCapCommand(cmd string, args []string) error {
		}
	case "LIST":
		var caps []string
		for name := range dc.caps {
			caps = append(caps, name)
		for name, enabled := range dc.caps {
			if enabled {
				caps = append(caps, name)
			}
		}

		// TODO: multi-line replies
-- 
2.31.1
Good catch! Note, CAP LIST is not to be confused with CAP LS…

Pushed, thanks.

To git.sr.ht:~emersion/soju
   ec26117c081b..3b41c87a41e1  master -> master