|
|
|
@ -129,7 +129,9 @@ impl SessionUser {
|
|
|
|
|
USER_DISCRIMINATOR_COOKIE,
|
|
|
|
|
user.discriminator.to_string(),
|
|
|
|
|
));
|
|
|
|
|
cookies.add_private(Cookie::new(USER_AVATAR_COOKIE, user.avatar()));
|
|
|
|
|
if let Some(avatar) = &user.avatar {
|
|
|
|
|
cookies.add_private(Cookie::new(USER_AVATAR_COOKIE, avatar.clone()));
|
|
|
|
|
}
|
|
|
|
|
Ok(Self(user))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -147,7 +149,7 @@ impl SessionUser {
|
|
|
|
|
id: parse_cookie_value(cookies, USER_ID_COOKIE)?,
|
|
|
|
|
name: parse_cookie_value(cookies, USER_NAME_COOKIE)?,
|
|
|
|
|
discriminator: parse_cookie_value(cookies, USER_DISCRIMINATOR_COOKIE)?,
|
|
|
|
|
avatar: Some(parse_cookie_value(cookies, USER_AVATAR_COOKIE)?),
|
|
|
|
|
avatar: parse_cookie_value(cookies, USER_AVATAR_COOKIE),
|
|
|
|
|
deleted: false,
|
|
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|