Can redact message

This commit is contained in:
2025-11-24 13:06:31 +01:00
parent 639cc6c737
commit 0a395b0d26
3 changed files with 37 additions and 9 deletions

View File

@@ -83,7 +83,7 @@ pub async fn get_joined_spaces(client: MatrixClientExtractor) -> HttpResult {
#[derive(serde::Deserialize)]
pub struct RoomIdInPath {
pub(crate) id: OwnedRoomId,
pub(crate) room_id: OwnedRoomId,
}
/// Get the list of joined rooms of the user
@@ -91,7 +91,7 @@ pub async fn single_room_info(
client: MatrixClientExtractor,
path: web::Path<RoomIdInPath>,
) -> HttpResult {
Ok(match client.client.client.get_room(&path.id) {
Ok(match client.client.client.get_room(&path.room_id) {
None => HttpResponse::NotFound().json("Room not found"),
Some(r) => HttpResponse::Ok().json(APIRoomInfo::from_room(&r).await?),
})
@@ -103,7 +103,7 @@ pub async fn room_avatar(
client: MatrixClientExtractor,
path: web::Path<RoomIdInPath>,
) -> HttpResult {
let Some(room) = client.client.client.get_room(&path.id) else {
let Some(room) = client.client.client.get_room(&path.room_id) else {
return Ok(HttpResponse::NotFound().json("Room not found"));
};