From 4970ffd845183a3862746f891da134ae355b5e7b Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Wed, 5 Jul 2023 11:34:16 -0700 Subject: [PATCH] Fix login by adding default user deleted value Login broken in commit a048d313bf42c5e7e11c476e27f6c2d9e5277571 --- src/models/user/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/models/user/mod.rs b/src/models/user/mod.rs index 2b7e7ad..61014cd 100644 --- a/src/models/user/mod.rs +++ b/src/models/user/mod.rs @@ -28,9 +28,14 @@ pub struct User { #[serde(deserialize_with = "deserialize_discriminator")] pub discriminator: u16, pub avatar: Option, + #[serde(default = "default_deleted")] pub deleted: bool, } +fn default_deleted() -> bool { + false +} + impl Username for User { fn username(&self) -> String { if self.discriminator == 0 {