Fix issue
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pierre HUBERT 2025-05-19 21:39:29 +02:00
parent b6020b99c6
commit 0106b2bfea
3 changed files with 3 additions and 3 deletions

BIN
src/server/api/.ws.rs.swp Normal file

Binary file not shown.

View File

@ -94,7 +94,7 @@ pub async fn ws_handler(
}
// 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 {
log::error!("Failed to send SyncEvent: {}", e);
}

View File

@ -122,12 +122,12 @@ async fn sync_task(
match msg_stream {
Ok(Some(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,
account_data: msg.account_data,
to_device: msg.to_device,
device_lists: msg.device_lists,
})) {
}))) {
log::error!("Failed to propagate event! {e}");
}
}