feat: include groups and dms in fetch mutuals

This commit is contained in:
Zomatree
2025-08-24 03:40:10 +01:00
parent 5335124306
commit caa8607468
2 changed files with 6 additions and 3 deletions

View File

@@ -8,9 +8,9 @@ use revolt_result::{create_error, Result};
use rocket::serde::json::Json;
use rocket::State;
/// # Fetch Mutual Friends And Servers
/// # Fetch Mutual Friends, Servers, Groups and DMs
///
/// Retrieve a list of mutual friends and servers with another user.
/// Retrieve a list of mutual friends, servers, groups and DMs with another user.
#[openapi(tag = "Relationships")]
#[get("/<target>/mutual")]
pub async fn mutual(
@@ -32,5 +32,6 @@ pub async fn mutual(
Ok(Json(v0::MutualResponse {
users: db.fetch_mutual_user_ids(&user.id, &target.id).await?,
servers: db.fetch_mutual_server_ids(&user.id, &target.id).await?,
channels: db.fetch_mutual_channel_ids(&user.id, &target.id).await?,
}))
}