Fix remote cursor duplication

This commit is contained in:
Andras Schmelczer 2025-10-18 21:30:45 +01:00
parent c0171ad72f
commit 088f474a2e
3 changed files with 48 additions and 7 deletions

View file

@ -106,7 +106,19 @@ async fn websocket(
continue;
}
send_update_over_websocket(&update.message, &mut sender).await?;
let message = match update.message {
WebSocketServerMessage::CursorPositions(CursorPositionFromServer { clients }) => {
WebSocketServerMessage::CursorPositions(CursorPositionFromServer {
clients: clients
.into_iter()
.filter(|client| client.device_id != device_id)
.collect(),
})
}
WebSocketServerMessage::VaultUpdate(_) => update.message,
};
send_update_over_websocket(&message, &mut sender).await?;
}
Ok::<(), SyncServerError>(())