Compare commits

..
2 changed files with 2 additions and 6 deletions
@@ -76,7 +76,7 @@ auto_derived!(
/// User's active status
pub struct UserStatus {
/// Custom status text
#[serde(skip_serializing_if = "String::is_empty")]
#[serde(skip_serializing_if = "String::is_empty", default)]
pub text: String,
/// Current presence option
#[serde(skip_serializing_if = "Option::is_none")]
@@ -86,7 +86,7 @@ auto_derived!(
/// User's profile
pub struct UserProfile {
/// Text content on user's profile
#[serde(skip_serializing_if = "String::is_empty")]
#[serde(skip_serializing_if = "String::is_empty", default)]
pub content: String,
/// Background visible on user's profile
#[serde(skip_serializing_if = "Option::is_none")]
@@ -11,10 +11,6 @@ use rocket::serde::json::Json;
#[openapi(tag = "Groups")]
#[get("/<target>/members")]
pub async fn req(db: &Db, user: User, target: Ref) -> Result<Json<Vec<User>>> {
if user.bot.is_some() {
return Err(Error::IsBot);
}
let channel = target.as_channel(db).await?;
perms(&user)
.channel(&channel)