-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resume on resumable session invalidations
Session invalidations include whether the session may be resumable. Previously, this was not parsed by serenity. This data is now contained in `GatewayEvent::InvalidateSession` as a boolean, which constitutes a breaking change for users that manually handle gateway events. Upgrade path: Instead of pattern matching on simply the variant like so: ```rust use serenity::model::event::GatewayEvent; match gateway_event { GatewayEvent::InvalidateSession => { // work here }, // other matching arms here _ => {}, } ``` Instead pattern match it as a single field tuple-struct: ```rust use serenity::model::event::GatewayEvent; match gateway_event { GatewayEvent::InvalidateSession(resumable) => { // work here }, // other matching arms here _ => {}, } ```
- Loading branch information
Zeyla Hellyer
committed
Oct 10, 2017
1 parent
1735e57
commit eb9e8df
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters