From d386b65d34438fda3aec012f260a719d39307f3d Mon Sep 17 00:00:00 2001 From: Valdemar Erk Date: Fri, 28 Feb 2020 16:20:25 +0100 Subject: [PATCH] Fix to UpdateStatus and INVITE_CREATE UpdateStatus was errorously sending a indentify instead of an status update opcode. INVITE_CREATE had some errors in the documentation, they have not yet been fixed, but I have confirmation that this is correct. Signed-off-by: Valdemar Erk --- model/src/gateway/payload/invite_create.rs | 4 ++-- model/src/gateway/payload/update_status.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/src/gateway/payload/invite_create.rs b/model/src/gateway/payload/invite_create.rs index d97d6ea96f0..064345e0f49 100644 --- a/model/src/gateway/payload/invite_create.rs +++ b/model/src/gateway/payload/invite_create.rs @@ -10,7 +10,7 @@ pub struct InviteCreate { pub code: String, pub created_at: String, pub guild_id: GuildId, - pub inviter: PartialUser, + pub inviter: Option, pub max_age: u64, pub max_uses: u64, pub temporary: bool, @@ -23,7 +23,7 @@ pub struct InviteCreate { )] #[derive(Clone, Debug, Eq, Hash, PartialEq)] pub struct PartialUser { - avatar: String, + avatar: Option, discriminator: String, id: UserId, username: String, diff --git a/model/src/gateway/payload/update_status.rs b/model/src/gateway/payload/update_status.rs index 12f6035ebf2..8bd1c2cea18 100644 --- a/model/src/gateway/payload/update_status.rs +++ b/model/src/gateway/payload/update_status.rs @@ -22,7 +22,7 @@ impl UpdateStatus { ) -> Self { Self { d: UpdateStatusInfo::new(afk, game, since, status), - op: OpCode::Identify, + op: OpCode::StatusUpdate, } } }