Closed Bug 1446689 Opened 6 years ago Closed 5 years ago

CAP negotiation v3.2

Categories

(Chat Core :: IRC, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Instantbird 72

People

(Reporter: freaktechnik, Assigned: freaktechnik)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file, 5 obsolete files)

IRC v3.2 update the capability negotiation. Most notably, it completely removes flags for capabilites, allows the listing to include a value, which can help in neogitiation and capabilities can be added and removed while the client is connected.

The last of these features is very useful in combination with bouncers, since those can then transparently forward capabilities, in sync with the server connecting and disconnecting.

Spec: https://ircv3.net/specs/core/capability-negotiation-3.2.html and https://ircv3.net/specs/extensions/cap-notify-3.2.html (which can technically also be available by servers that don't support CAP v3.2 itself)
Attached patch bug1446689.patch (obsolete) — Splinter Review
This patch implements CAP v3.2, cap-notify and updates all the CAP based features to take advantage of them, if possible.

I have yet to write tests for it, when I've done that I'll request review instead.
Attachment #8959876 - Flags: feedback?(clokep)
Attached patch bug1446689-v2.patch (obsolete) — Splinter Review
Now includes tests for the new CAP stuff, however doesn't cover cap-notify as much as I'd like it to (by far). But I don't have any idea of how to actually test that.

Also fixes a bug with capability values.
Attachment #8959876 - Attachment is obsolete: true
Attachment #8959876 - Flags: feedback?(clokep)
Attachment #8959947 - Flags: review?(clokep)
Attached patch bug1446689-v3.patch (obsolete) — Splinter Review
Fix multi-line negotiation with multiple IRC accounts.
Attachment #8959947 - Attachment is obsolete: true
Attachment #8959947 - Flags: review?(clokep)
Attachment #8959950 - Flags: review?(clokep)
Attached patch Patch v4 (obsolete) — Splinter Review

I unbitrotted and ran eslint on your patch. Haven't really looked too deeply into this although I did read the spec: https://ircv3.net/specs/core/capability-negotiation.html

Attachment #8959950 - Attachment is obsolete: true
Attachment #8959950 - Flags: review?(clokep)
Attachment #9051376 - Flags: review?(clokep)
Blocks: ircv3
Attached patch Patch v4.1 (obsolete) — Splinter Review

Unbitrotted and ran eslint again.

Attachment #9051376 - Attachment is obsolete: true
Attachment #9051376 - Flags: review?(clokep)
Attachment #9104279 - Flags: review?(clokep)
Attached patch Patch v4.2Splinter Review

Tested this on freenode and moznet and it works fine, as far as I can tell. Those (unfortunately) don't have a ton of capabilities enabled.

I did change one thing in this patch: the version before this used ADD to enable new capabilities, but the spec (https://ircv3.net/specs/core/capability-negotiation.html) says this is done via NEW. I've been unable to find any references to ADD. Was this just a typo or did this come from something that's changed in the past two years?

Attachment #9104279 - Attachment is obsolete: true
Attachment #9104279 - Flags: review?(clokep)
Attachment #9104307 - Flags: review+

(In reply to Patrick Cloke [:clokep] from comment #6)

Was this just a typo or did this come from something that's changed in the past two years?

Is "I can't recall" a fair answer? I guess we could check the git history of the spec. But then I'd expect them to have changed the version if they changed the verb.

Either way, thanks for reviewing the patch after all this time.

I'll note that once this lands it should be added to the ircv3 client support table, which I'd happily do.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/b2b10252b791
Support IRC CAP negotiation v3.2. r=clokep DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Don't worry about the DONTBUILD. Daily will build it now and I also had a try run:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=9390e5f978955be0d6595e21685ab73d2e35d318
... and also, there aren't (m)any tests for chat. Note that an important test is still turned off, see bug 1542397.

Target Milestone: --- → Instantbird 72
Regressions: 1594323
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: