Fix macro forwarding

This commit is contained in:
Tobias Reisinger 2026-09-07 23:18:09 +02:00
commit f7216be6e5
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View file

@ -815,7 +815,7 @@ dependencies = [
[[package]] [[package]]
name = "emgauwa-core" name = "emgauwa-core"
version = "0.5.3" version = "0.5.4"
dependencies = [ dependencies = [
"actix", "actix",
"actix-cors", "actix-cors",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "emgauwa-core" name = "emgauwa-core"
version = "0.5.3" version = "0.5.4"
edition = "2021" edition = "2021"
authors = ["Tobias Reisinger <tobias@msrg.cc>"] authors = ["Tobias Reisinger <tobias@msrg.cc>"]

View file

@ -139,7 +139,7 @@ pub async fn execute(
let affected_relays = let affected_relays =
collect_affected_relays(&mut pool_conn, &mut actions, &controller).await?; collect_affected_relays(&mut pool_conn, &mut actions, &controller).await?;
ws_server_tx.send(WsServerAction::ForwardToController(uid.clone(), ControllersWsAction::Relays(affected_relays.clone())))?; ws_server_tx.send(WsServerAction::ForwardToController(controller.uid.clone(), ControllersWsAction::Relays(affected_relays.clone())))?;
} }
pool_conn.close().await?; pool_conn.close().await?;

View file

@ -180,7 +180,7 @@ impl WsServer {
} }
} }
WsServerAction::ForwardToController(uid, action) => { WsServerAction::ForwardToController(uid, action) => {
log::debug!("Forwarding action: {:?}", action); log::debug!("Forwarding action: {:?} to controller {}", action, uid);
if let Some((_, address)) = self.controllers.get(&uid) { if let Some((_, address)) = self.controllers.get(&uid) {
self.text_to_controller_conn(*address, serde_json::to_string(&action)?); self.text_to_controller_conn(*address, serde_json::to_string(&action)?);
} }