-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: support resume urls #8784
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Co-authored-by: Almeida <almeidx@pm.me>
Running |
Codecov Report
@@ Coverage Diff @@
## main #8784 +/- ##
==========================================
- Coverage 92.06% 85.81% -6.26%
==========================================
Files 10 91 +81
Lines 2093 9254 +7161
Branches 240 1125 +885
==========================================
+ Hits 1927 7941 +6014
- Misses 163 1271 +1108
- Partials 3 42 +39
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in hindsight, you aren't supposed to use the resume URL in case of a full reconnect. You should be clearing it in destroy
if reset
is true.
Discord.JS uses pascal case so why we need url to be all capital? |
We always uppercase abbreviations, e.g. |
Ok then, applied the changes you requested |
@@ -64,6 +64,13 @@ class WebSocketShard extends EventEmitter { | |||
*/ | |||
this.sessionId = null; | |||
|
|||
/** | |||
* The resume url for this shard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The resume url for this shard | |
* The resume URL for this shard |
@@ -842,10 +852,11 @@ class WebSocketShard extends EventEmitter { | |||
// Step 4: Cache the old sequence (use to attempt a resume) | |||
if (this.sequence !== -1) this.closeSequence = this.sequence; | |||
|
|||
// Step 5: Reset the sequence and session id if requested | |||
// Step 5: Reset the sequence, resume url and session id if requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Step 5: Reset the sequence, resume url and session id if requested | |
// Step 5: Reset the sequence, resume URL and session id if requested |
Please describe the changes this PR makes and why it should be merged:
Resume urls was not added in v14 despite on changelogs saying it is, was only added on
@discordjs/ws
Status and versioning classification: