23 Commits

Author SHA1 Message Date
999766b0bc chore(deps): update rust crate actix-remote-ip to v1
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-20 00:27:22 +00:00
de527d2833 chore: updated project dependencies
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-18 19:59:58 +01:00
e5ca2f98fd Merge branch 'master' of https://gitea.communiquons.org/pierre/MatrixGW 2026-03-18 19:53:19 +01:00
a51edd6093 feat: can get information about connected devices 2026-03-18 19:53:12 +01:00
f544d1d4ca Merge pull request 'chore(deps): update rust crate ractor to 0.15.12' (#208) from renovate/ractor-0.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-18 00:28:46 +00:00
e950517ab2 Merge pull request 'chore(deps): update rust crate mailchecker to 6.0.20' (#207) from renovate/mailchecker-6.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-18 00:28:41 +00:00
1914d1a429 chore(deps): update rust crate ractor to 0.15.12
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-17 00:27:49 +00:00
ea4422701d chore(deps): update rust crate mailchecker to 6.0.20
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-17 00:27:47 +00:00
32bbe52cc5 Merge pull request 'chore(deps): update rust crate tokio to 1.50.0' (#206) from renovate/tokio-1.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-16 00:30:45 +00:00
1cff950f8f Merge pull request 'chore(deps): update rust crate image to 0.25.10' (#205) from renovate/image-0.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-16 00:30:35 +00:00
a2bdb7e6b8 chore(deps): update rust crate tokio to 1.50.0
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-15 00:30:25 +00:00
3dedd47b14 chore(deps): update rust crate image to 0.25.10
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-15 00:30:13 +00:00
ba31e19c76 Merge pull request 'chore(deps): update dependency dayjs to ^1.11.20' (#204) from renovate/dayjs-1.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-14 00:30:50 +00:00
6557f4ad45 chore(deps): update dependency dayjs to ^1.11.20
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2026-03-14 00:30:45 +00:00
18206af6b8 Merge pull request 'chore(deps): update dependency @mui/x-data-grid to ^8.27.5' (#203) from renovate/mui-x-data-grid-8.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-13 00:28:24 +00:00
280388d11f chore(deps): update dependency @mui/x-data-grid to ^8.27.5
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-13 00:28:18 +00:00
7455e8771b Merge pull request 'chore(deps): update materialui to ^7.3.9' (#201) from renovate/materialui into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-12 00:30:30 +00:00
c87dbc670d chore(deps): update materialui to ^7.3.9
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-11 00:17:49 +00:00
a5ad5973b7 feat: do not return latest_event info when getting single room information by default
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-10 18:14:49 +01:00
01b1434e37 Merge pull request 'chore(deps): update dependency eslint to ^9.39.4' (#200) from renovate/eslint-9.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-09 00:17:01 +00:00
7a60460973 chore(deps): update dependency eslint to ^9.39.4
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2026-03-09 00:16:59 +00:00
a8cfdaf287 Merge pull request 'chore(deps): update dependency date-and-time to ^4.3.1' (#199) from renovate/date-and-time-4.x into master
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-08 00:16:37 +00:00
f13fac582b chore(deps): update dependency date-and-time to ^4.3.1
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2026-03-08 00:16:32 +00:00
9 changed files with 342 additions and 603 deletions

View File

@@ -135,12 +135,13 @@ dependencies = [
[[package]] [[package]]
name = "actix-remote-ip" name = "actix-remote-ip"
version = "0.1.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7629b357d4705cf3f1e31f989f48ecd56027112f7d52dcf06dd96ee197065f8e" checksum = "0a9469cdaaafa2e5ade253b9a03b4913d4071a2fc937b747e712a4c9f4b84395"
dependencies = [ dependencies = [
"actix-web", "actix-web",
"futures-util", "futures-util",
"ipnet",
"log", "log",
] ]
@@ -2672,9 +2673,9 @@ dependencies = [
[[package]] [[package]]
name = "image" name = "image"
version = "0.25.9" version = "0.25.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"byteorder-lite", "byteorder-lite",
@@ -2690,8 +2691,8 @@ dependencies = [
"rayon", "rayon",
"rgb", "rgb",
"tiff", "tiff",
"zune-core 0.5.1", "zune-core",
"zune-jpeg 0.5.12", "zune-jpeg",
] ]
[[package]] [[package]]
@@ -2823,9 +2824,9 @@ dependencies = [
[[package]] [[package]]
name = "ipnet" name = "ipnet"
version = "2.11.0" version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
dependencies = [ dependencies = [
"serde", "serde",
] ]
@@ -3211,9 +3212,9 @@ dependencies = [
[[package]] [[package]]
name = "mailchecker" name = "mailchecker"
version = "6.0.19" version = "6.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abad4bc63045f04cfc55aa4c55d4ec0a890c377ce56463bfc2adc2bc059c4b84" checksum = "e32897aec7dd28fa9a39f02a0a08e434f50e2761214e40cec745eb7c411cdb48"
dependencies = [ dependencies = [
"fast_chemail", "fast_chemail",
"once_cell", "once_cell",
@@ -3690,9 +3691,9 @@ dependencies = [
[[package]] [[package]]
name = "moxcms" name = "moxcms"
version = "0.7.11" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"
dependencies = [ dependencies = [
"num-traits", "num-traits",
"pxfm", "pxfm",
@@ -4331,9 +4332,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]] [[package]]
name = "ractor" name = "ractor"
version = "0.15.10" version = "0.15.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6102314f700f3e8df466c49110830b18cbfc172f88f27a9d7383e455663b1be7" checksum = "4a64ac8ba2e8d71b25c55ab7acafc481ae4c9175f3ee8f7c36b66c4cad369bb5"
dependencies = [ dependencies = [
"bon", "bon",
"dashmap", "dashmap",
@@ -4471,9 +4472,9 @@ dependencies = [
[[package]] [[package]]
name = "ravif" name = "ravif"
version = "0.12.0" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef69c1990ceef18a116855938e74793a5f7496ee907562bd0857b6ac734ab285" checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45"
dependencies = [ dependencies = [
"avif-serialize", "avif-serialize",
"imgref", "imgref",
@@ -5551,16 +5552,16 @@ dependencies = [
[[package]] [[package]]
name = "tiff" name = "tiff"
version = "0.10.3" version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"
dependencies = [ dependencies = [
"fax", "fax",
"flate2", "flate2",
"half", "half",
"quick-error", "quick-error",
"weezl", "weezl",
"zune-jpeg 0.4.21", "zune-jpeg",
] ]
[[package]] [[package]]
@@ -5621,9 +5622,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.49.0" version = "1.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d"
dependencies = [ dependencies = [
"bytes", "bytes",
"libc", "libc",
@@ -5998,9 +5999,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "1.21.0" version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
dependencies = [ dependencies = [
"getrandom 0.4.1", "getrandom 0.4.1",
"js-sys", "js-sys",
@@ -6801,12 +6802,6 @@ dependencies = [
"pkg-config", "pkg-config",
] ]
[[package]]
name = "zune-core"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
[[package]] [[package]]
name = "zune-core" name = "zune-core"
version = "0.5.1" version = "0.5.1"
@@ -6822,20 +6817,11 @@ dependencies = [
"simd-adler32", "simd-adler32",
] ]
[[package]]
name = "zune-jpeg"
version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713"
dependencies = [
"zune-core 0.4.12",
]
[[package]] [[package]]
name = "zune-jpeg" name = "zune-jpeg"
version = "0.5.12" version = "0.5.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe" checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe"
dependencies = [ dependencies = [
"zune-core 0.5.1", "zune-core",
] ]

View File

@@ -9,10 +9,10 @@ log = "0.4.29"
clap = { version = "4.5.60", features = ["derive", "env"] } clap = { version = "4.5.60", features = ["derive", "env"] }
anyhow = "1.0.102" anyhow = "1.0.102"
serde = { version = "1.0.228", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
tokio = { version = "1.49.0", features = ["full"] } tokio = { version = "1.50.0", features = ["full"] }
actix-web = "4.13.0" actix-web = "4.13.0"
actix-session = { version = "0.11.0", features = ["redis-session"] } actix-session = { version = "0.11.0", features = ["redis-session"] }
actix-remote-ip = "0.1.0" actix-remote-ip = "1.0.0"
actix-cors = "0.7.1" actix-cors = "0.7.1"
actix-multipart = "0.7.2" actix-multipart = "0.7.2"
light-openid = "1.1.0" light-openid = "1.1.0"
@@ -22,19 +22,19 @@ base16ct = { version = "1.0.0", features = ["alloc"] }
futures-util = "0.3.32" futures-util = "0.3.32"
jwt-simple = { version = "0.12.14", default-features = false, features = ["pure-rust"] } jwt-simple = { version = "0.12.14", default-features = false, features = ["pure-rust"] }
thiserror = "2.0.18" thiserror = "2.0.18"
uuid = { version = "1.21.0", features = ["v4", "serde"] } uuid = { version = "1.22.0", features = ["v4", "serde"] }
ipnet = { version = "2.11.0", features = ["serde"] } ipnet = { version = "2.12.0", features = ["serde"] }
rand = "0.10.0" rand = "0.10.0"
hex = "0.4.3" hex = "0.4.3"
mailchecker = "6.0.19" mailchecker = "6.0.20"
matrix-sdk = { version = "0.16.0", features = ["e2e-encryption"] } matrix-sdk = { version = "0.16.0", features = ["e2e-encryption"] }
matrix-sdk-ui = "0.16.0" matrix-sdk-ui = "0.16.0"
url = "2.5.8" url = "2.5.8"
ractor = "0.15.10" ractor = "0.15.12"
serde_json = "1.0.149" serde_json = "1.0.149"
lazy-regex = "3.6.0" lazy-regex = "3.6.0"
actix-ws = "0.4.0" actix-ws = "0.4.0"
infer = "0.19.0" infer = "0.19.0"
rust-embed = "8.11.0" rust-embed = "8.11.0"
mime_guess = "2.0.5" mime_guess = "2.0.5"
image = "0.25.9" image = "0.25.10"

View File

@@ -0,0 +1,9 @@
use crate::controllers::HttpResult;
use crate::extractors::matrix_client_extractor::MatrixClientExtractor;
use actix_web::HttpResponse;
/// Get the list of devices for the account
pub async fn get_list(client: MatrixClientExtractor) -> HttpResult {
let devices = client.client.client.devices().await?.devices;
Ok(HttpResponse::Ok().json(devices))
}

View File

@@ -115,17 +115,31 @@ pub struct RoomIdInPath {
pub(crate) room_id: OwnedRoomId, pub(crate) room_id: OwnedRoomId,
} }
#[derive(serde::Deserialize)]
pub struct SingleRoomQuery {
#[serde(default)]
pub with_latest_event: bool,
}
/// Get the list of joined rooms of the user /// Get the list of joined rooms of the user
pub async fn single_room_info( pub async fn single_room_info(
client: MatrixClientExtractor, client: MatrixClientExtractor,
path: web::Path<RoomIdInPath>, path: web::Path<RoomIdInPath>,
query: web::Query<SingleRoomQuery>,
) -> HttpResult { ) -> HttpResult {
let notifs = client.client.client.notification_settings().await; let notifs = client.client.client.notification_settings().await;
Ok(match client.client.client.get_room(&path.room_id) { let Some(room) = client.client.client.get_room(&path.room_id) else {
None => HttpResponse::NotFound().json("Room not found"), return Ok(HttpResponse::NotFound().json("Room not found"));
Some(r) => HttpResponse::Ok().json(APIRoomInfo::from_room(&r, &notifs).await?), };
})
let mut room_info = APIRoomInfo::from_room(&room, &notifs).await?;
if !query.with_latest_event {
room_info.latest_event = None;
}
Ok(HttpResponse::Ok().json(room_info))
} }
/// Get room avatar /// Get room avatar

View File

@@ -1,3 +1,4 @@
pub mod matrix_devices_controller;
pub mod matrix_event_controller; pub mod matrix_event_controller;
pub mod matrix_media_controller; pub mod matrix_media_controller;
pub mod matrix_profile_controller; pub mod matrix_profile_controller;

View File

@@ -25,6 +25,8 @@ pub enum HttpFailure {
ActixError(#[from] actix_web::Error), ActixError(#[from] actix_web::Error),
#[error("Matrix error: {0}")] #[error("Matrix error: {0}")]
MatrixError(#[from] matrix_sdk::Error), MatrixError(#[from] matrix_sdk::Error),
#[error("Matrix HTTP error: {0}")]
MatrixHTTPError(#[from] matrix_sdk::HttpError),
#[error("Matrix decryptor error: {0}")] #[error("Matrix decryptor error: {0}")]
MatrixDecryptorError(#[from] matrix_sdk::encryption::DecryptorError), MatrixDecryptorError(#[from] matrix_sdk::encryption::DecryptorError),
#[error("Serde JSON error: {0}")] #[error("Serde JSON error: {0}")]

View File

@@ -10,8 +10,8 @@ use matrixgw_backend::app_config::AppConfig;
use matrixgw_backend::broadcast_messages::BroadcastMessage; use matrixgw_backend::broadcast_messages::BroadcastMessage;
use matrixgw_backend::constants; use matrixgw_backend::constants;
use matrixgw_backend::controllers::matrix::{ use matrixgw_backend::controllers::matrix::{
matrix_event_controller, matrix_media_controller, matrix_profile_controller, matrix_devices_controller, matrix_event_controller, matrix_media_controller,
matrix_room_controller, matrix_space_controller, matrix_profile_controller, matrix_room_controller, matrix_space_controller,
}; };
use matrixgw_backend::controllers::server_controller::ServerConstraints; use matrixgw_backend::controllers::server_controller::ServerConstraints;
use matrixgw_backend::controllers::{ use matrixgw_backend::controllers::{
@@ -142,6 +142,11 @@ async fn main() -> std::io::Result<()> {
web::get().to(matrix_sync_thread_controller::status), web::get().to(matrix_sync_thread_controller::status),
) )
.service(web::resource("/api/ws").route(web::get().to(ws_controller::ws))) .service(web::resource("/api/ws").route(web::get().to(ws_controller::ws)))
// Matrix connection status
.route(
"/api/matrix/devices",
web::get().to(matrix_devices_controller::get_list),
)
// Matrix spaces controller // Matrix spaces controller
.route( .route(
"/api/matrix/space/hierarchy", "/api/matrix/space/hierarchy",

File diff suppressed because it is too large Load Diff

View File

@@ -13,12 +13,12 @@
"@emotion/react": "^11.14.0", "@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1", "@emotion/styled": "^11.14.1",
"@fontsource/roboto": "^5.2.10", "@fontsource/roboto": "^5.2.10",
"@mui/icons-material": "^7.3.8", "@mui/icons-material": "^7.3.9",
"@mui/material": "^7.3.8", "@mui/material": "^7.3.9",
"@mui/x-data-grid": "^8.27.4", "@mui/x-data-grid": "^8.27.5",
"@mui/x-date-pickers": "^8.27.2", "@mui/x-date-pickers": "^8.27.2",
"date-and-time": "^4.3.0", "date-and-time": "^4.3.1",
"dayjs": "^1.11.19", "dayjs": "^1.11.20",
"emoji-picker-react": "^4.18.0", "emoji-picker-react": "^4.18.0",
"filesize": "^11.0.13", "filesize": "^11.0.13",
"is-cidr": "^6.0.3", "is-cidr": "^6.0.3",
@@ -31,16 +31,16 @@
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^10.0.1", "@eslint/js": "^10.0.1",
"@types/node": "^25.3.5", "@types/node": "^25.5.0",
"@types/react": "^19.2.14", "@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.4", "@vitejs/plugin-react": "^6.0.1",
"eslint": "^9.39.3", "eslint": "^10.0.3",
"eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2", "eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.4.0", "globals": "^17.4.0",
"typescript": "~5.9.3", "typescript": "~5.9.3",
"typescript-eslint": "^8.56.1", "typescript-eslint": "^8.57.1",
"vite": "npm:rolldown-vite@7.3.1" "vite": "npm:rolldown-vite@7.3.1"
}, },
"overrides": { "overrides": {