diff --git a/client/Upload.tsx b/client/Upload.tsx index a892bfa..d37beb8 100644 --- a/client/Upload.tsx +++ b/client/Upload.tsx @@ -35,14 +35,10 @@ export default function Upload({ roomId }) { message.header, decryptionKeyInternal ); - console.log("header", message.header); - console.log("state", state); setDecryptState(state); } if (message.type === "FileUploadChunk") { - console.log("data", message); - if (readyToDownload && decryptState) { for (const { data } of [...pendingDecryption, message]) { const { message } = @@ -51,7 +47,6 @@ export default function Upload({ roomId }) { data ); const result = await writeStream.write(message); - console.log("output", result, message); } setPendingDecryption([]); } else { @@ -61,7 +56,6 @@ export default function Upload({ roomId }) { if (message.type === "FileUploadComplete") { await writeStream.close(); - console.log("done!"); } }, }); @@ -83,7 +77,6 @@ export default function Upload({ roomId }) { if (!encryptionKey) return; if (!selectedFile) return; - console.log("file", selectedFile); const { state, header } = sodium.crypto_secretstream_xchacha20poly1305_init_push(encryptionKey); sendCborMessage({ @@ -114,14 +107,12 @@ export default function Upload({ roomId }) { room_id: roomId, data: encryptedValue, }); - console.log("sent encrypted chunk", encryptedValue); } sendCborMessage({ type: "FileUploadComplete", room_id: roomId, }); - console.log("sent done"); } finally { reader.releaseLock(); } @@ -129,7 +120,6 @@ export default function Upload({ roomId }) { async function selectSaveFile() { const newHandle = await window.showSaveFilePicker(); - console.log("handle", newHandle); setSelectedSaveFile(newHandle); const writableStream = await newHandle.createWritable(); diff --git a/src/main.rs b/src/main.rs index 14d2b3c..cbbfcbf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -124,7 +124,7 @@ async fn handle_socket(state: AppState, socket: WebSocket) -> Result<()> { WsMessage::Binary(ref bin) => { let cursor = Cursor::new(bin); let message = ciborium::from_reader::(cursor)?; - println!("received message: {message:?}"); + // println!("received message: {message:?}"); match &message { Message::Automerge { @@ -145,7 +145,7 @@ async fn handle_socket(state: AppState, socket: WebSocket) -> Result<()> { document .receive_sync_message(sync_state, inner_message.clone().0)?; } - println!("inner doc: {:?}", room.document); + // println!("inner doc: {:?}", room.document); // Remove current client, so send to everyone else let mut connected_clients = room.connected_clients.clone(); @@ -283,8 +283,8 @@ where I: IntoIterator, { let client_ids = client_ids.into_iter().collect::>(); - println!("Broadcasting message to {} clients:", client_ids.len()); - println!(" - message: {message:?}"); + // println!("Broadcasting message to {} clients:", client_ids.len()); + // println!(" - message: {message:?}"); stream::iter( client_ids