diff options
| author | Zeyla Hellyer <[email protected]> | 2017-10-09 17:22:15 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-09 17:22:15 -0700 |
| commit | eb9e8dfbc9d778de405d7369579d90c49a2bf90c (patch) | |
| tree | 670260a6b61a0d9e5ea1c3f4f76e17c9a98f6cd3 /src/framework | |
| parent | Make webhook_id a majour parameter in ratelimiting (diff) | |
| download | serenity-eb9e8dfbc9d778de405d7369579d90c49a2bf90c.tar.xz serenity-eb9e8dfbc9d778de405d7369579d90c49a2bf90c.zip | |
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
_ => {},
}
```
Diffstat (limited to 'src/framework')
0 files changed, 0 insertions, 0 deletions