Skip to content

Fix cap-notify#464

Merged
slingamn merged 3 commits intomasterfrom
fix-cap-notify
Apr 28, 2019
Merged

Fix cap-notify#464
slingamn merged 3 commits intomasterfrom
fix-cap-notify

Conversation

@DanielOaks
Copy link
Copy Markdown
Member

@DanielOaks DanielOaks commented Apr 27, 2019

It looks like cap-notify's been a little busted. Not related to the bnc stuff, just in general probably. This PR fixes that up a little.

It seems there's still s'more to do with regards to getting the values to be passed-thru on cap value replies, seems to be sending out empty lines currently. The SASL enable/disable block should reeeally just use the same structure as the STS section below, that handles things a whole lot more nicely.

Issues this should resolve:

  • Currently, if someone sends CAP LS 302 they won't automagically receive cap-notify messages (as the spec indicates they should). This PR should mean they will, without having to explicitly request that capability separately.
  • Currently, if someone sends CAP LS 303, they won't get any of the 302 stuff (specifically, the auto-cap-notify behaviour above). This PR should mean they will.

Issues to be resolved:

  • It, uh. Seems that cap values aren't being correctly sent in soooome situations, maybe? Investigate, I've had some trouble around sasl in particular, dunno exactly what's going on there.

defer clients.RUnlock()
for _, client := range clients.byNick {
for _, session := range client.Sessions() {
capabs = append(capabs, caps.CapNotify)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appends an extra copy of caps.CapNotify on every iteration, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... good point

@slingamn slingamn merged commit 8c68b9f into master Apr 28, 2019
@slingamn slingamn deleted the fix-cap-notify branch February 21, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants