-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send all enabled capabilities on CAP LIST #67
Conversation
Just realized not all the internal capability tags match up to the on-the-wire ones even if you correct for |
Oops, good catch. You should be a global hashmap with |
Only |
Yep, that's what the conditional on 312-316 is for -- if it doesn't get the 302 it'll call it with
|
Ah right, i got confused because you added another pair of cases for "CAP LS" next to "CAP LIST"; those won't ever run so you don't really need the new function either. |
ah but clients can still call them outside registration, nvm |
Could you add tests for each of these cases? |
Yeah. There's not a lot of use for being able to do that until post hoc CAP REQ is also implemented (which I haven't touched here), but I wanted it for the sake of completeness and it wasn't hard to add.
Sure thing. Might not get to it until tomorrow though. |
Notably, this fixes an issue with weechat (and possibly some other clients) where if you ever run /cap or /cap list after connection registration, the client will see the "CAP * LIST sasl" reply as downgrading the connection to drop all capabilities except sasl. This also enables the use of CAP LS after connection registration, although without post-hoc CAP REQ support this is of limited use.
Done, and writing the unit tests also revealed a bug that weechat was fine with but which could have confused other clients, which is now fixed. |
Notably, this fixes an issue with weechat (and possibly some other clients) where if you ever run /cap or /cap list after connection registration, the client will see the "CAP * LIST sasl" reply as downgrading the connection to drop all capabilities except sasl.