This commit is contained in:
parent
b6020b99c6
commit
0106b2bfea
BIN
src/server/api/.ws.rs.swp
Normal file
BIN
src/server/api/.ws.rs.swp
Normal file
Binary file not shown.
@ -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);
|
||||
}
|
||||
|
@ -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}");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user