Merge remote-tracking branch 'origin/main' into feat/livekit

This commit is contained in:
Zomatree
2025-08-18 07:44:52 +01:00
120 changed files with 372 additions and 351 deletions

View File

@@ -8,7 +8,7 @@ use rocket::{serde::json::Json, State};
/// Fetch an invite by its id.
#[openapi(tag = "Invites")]
#[get("/<target>")]
pub async fn fetch(db: &State<Database>, target: Reference) -> Result<Json<v0::InviteResponse>> {
pub async fn fetch(db: &State<Database>, target: Reference<'_>) -> Result<Json<v0::InviteResponse>> {
Ok(Json(match target.as_invite(db).await? {
Invite::Server {
channel, creator, ..
@@ -27,7 +27,7 @@ pub async fn fetch(db: &State<Database>, target: Reference) -> Result<Json<v0::I
let server = db.fetch_server(&server).await?;
v0::InviteResponse::Server {
code: target.id,
code: target.id.to_string(),
member_count: db.fetch_member_count(&server.id).await? as i64,
server_id: server.id,
server_name: server.name,
@@ -57,7 +57,7 @@ pub async fn fetch(db: &State<Database>, target: Reference) -> Result<Json<v0::I
description,
..
} => v0::InviteResponse::Group {
code: target.id,
code: target.id.to_string(),
channel_id: id,
channel_name: name,
channel_description: description,