From ad58b550fb1eb36ed5a3ce8941443b23f44b1260 Mon Sep 17 00:00:00 2001 From: kozabrada123 <59031733+kozabrada123@users.noreply.github.com> Date: Fri, 18 Aug 2023 12:27:39 +0000 Subject: [PATCH] Minor gateway updates (#188) * Fix TYPING_START not existing * Fix spacebar READY deserialization error --- src/gateway.rs | 3 ++- src/types/events/session.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gateway.rs b/src/gateway.rs index 9bd4e12..3ac118d 100644 --- a/src/gateway.rs +++ b/src/gateway.rs @@ -628,6 +628,7 @@ impl Gateway { "STAGE_INSTANCE_CREATE" => stage_instance.create, "STAGE_INSTANCE_UPDATE" => stage_instance.update, "STAGE_INSTANCE_DELETE" => stage_instance.delete, + "TYPING_START" => user.typing_start, "USER_UPDATE" => user.update, "USER_GUILD_SETTINGS_UPDATE" => user.guild_settings_update, "VOICE_STATE_UPDATE" => voice.state_update, @@ -972,7 +973,7 @@ mod events { pub update: GatewayEvent, pub guild_settings_update: GatewayEvent, pub presence_update: GatewayEvent, - pub typing_start_event: GatewayEvent, + pub typing_start: GatewayEvent, } #[derive(Default, Debug)] diff --git a/src/types/events/session.rs b/src/types/events/session.rs index 574c5fa..868c8e8 100644 --- a/src/types/events/session.rs +++ b/src/types/events/session.rs @@ -13,7 +13,7 @@ pub struct SessionsReplace { #[derive(Debug, Deserialize, Serialize, Default, Clone)] /// Session info for the current user pub struct Session { - pub activities: Vec, + pub activities: Option>, pub client_info: ClientInfo, pub session_id: String, pub status: String, @@ -24,7 +24,7 @@ pub struct Session { /// {"client":"web","os":"other","version":0} // Note: I don't think this one exists yet? Though I might've made a mistake and this might be a duplicate pub struct ClientInfo { - pub client: String, + pub client: Option, pub os: String, pub version: u8, }