Compare commits

..

4 Commits

Author SHA1 Message Date
409e84951b Update Rust crate actix-web to 4.11.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-05-20 00:07:05 +00:00
f7527e6bc5 Update
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-19 21:41:49 +02:00
0106b2bfea Fix issue
All checks were successful
continuous-integration/drone/push Build is passing
2025-05-19 21:39:29 +02:00
b6020b99c6 Fix cargo clippy issue
Some checks failed
continuous-integration/drone/push Build is failing
2025-05-19 21:37:05 +02:00
3 changed files with 4 additions and 4 deletions

View File

@ -42,5 +42,5 @@ pub enum BroadcastMessage {
/// Stop a client with a given client ID /// Stop a client with a given client ID
StopSyncClient(SyncClientID), StopSyncClient(SyncClientID),
/// Propagate a new sync event /// Propagate a new sync event
SyncEvent(UserID, SyncEvent), SyncEvent(UserID, Box<SyncEvent>),
} }

View File

@ -94,7 +94,7 @@ pub async fn ws_handler(
} }
// Send the message to the websocket // Send the message to the websocket
if let Ok(msg) = serde_json::to_string(&WsMessage::Sync(event)) { if let Ok(msg) = serde_json::to_string(&WsMessage::Sync(*event)) {
if let Err(e) = session.text(msg).await { if let Err(e) = session.text(msg).await {
log::error!("Failed to send SyncEvent: {}", e); log::error!("Failed to send SyncEvent: {}", e);
} }

View File

@ -122,12 +122,12 @@ async fn sync_task(
match msg_stream { match msg_stream {
Ok(Some(msg)) => { Ok(Some(msg)) => {
log::debug!("Received new message from Matrix: {msg:#?}"); log::debug!("Received new message from Matrix: {msg:#?}");
if let Err(e) = tx.send(BroadcastMessage::SyncEvent(user_id.clone(), SyncEvent { if let Err(e) = tx.send(BroadcastMessage::SyncEvent(user_id.clone(), Box::new(SyncEvent {
rooms: msg.rooms,presence: msg.presence, rooms: msg.rooms,presence: msg.presence,
account_data: msg.account_data, account_data: msg.account_data,
to_device: msg.to_device, to_device: msg.to_device,
device_lists: msg.device_lists, device_lists: msg.device_lists,
})) { }))) {
log::error!("Failed to propagate event! {e}"); log::error!("Failed to propagate event! {e}");
} }
} }