forked from jmug/stoatchat
feat: include groups and dms in fetch mutuals
This commit is contained in:
@@ -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?,
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user