forked from jmug/stoatchat
Restrict bots from creating servers, groups, acking messages, and making friends.
This commit is contained in:
@@ -6,5 +6,9 @@ use rocket::serde::json::Value;
|
||||
|
||||
#[get("/unreads")]
|
||||
pub async fn req(user: User) -> Result<Value> {
|
||||
if user.bot.is_some() {
|
||||
return Err(Error::IsBot)
|
||||
}
|
||||
|
||||
Ok(json!(User::fetch_unreads(&user.id).await?))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user