This commit is contained in:
Andras Schmelczer 2026-04-23 21:14:29 +01:00
parent d715d94b6d
commit a7b588da97
14 changed files with 48 additions and 48 deletions

View file

@ -82,11 +82,7 @@ impl Broadcasts {
/// Synchronous: safe to invoke from a handler between `commit()` and
/// function return without worrying about task cancellation dropping
/// the broadcast mid-flight. Failures are logged, never propagated.
pub fn send_document_update(
&self,
vault: VaultId,
document: WebSocketServerMessageWithOrigin,
) {
pub fn send_document_update(&self, vault: VaultId, document: WebSocketServerMessageWithOrigin) {
let mut tx_map = self
.tx
.lock()

View file

@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
use ts_rs::TS;
use crate::app_state::database::models::{
DeviceId, DocumentId, DocumentVersionWithoutContent, UserId, VaultUpdateId,
DeviceId, DocumentId, DocumentVersionWithoutContent, VaultUpdateId,
};
#[derive(TS, Deserialize, Clone, Debug)]

View file

@ -33,9 +33,9 @@ pub fn get_authenticated_handshake(
let user = auth(state, handshake.token.trim(), vault_id)?;
Ok(AuthenticatedWebSocketHandshake { handshake, user })
}
WebSocketClientMessage::CursorPositions(_) => Err(
unauthenticated_error(anyhow::anyhow!("Expected a handshake message")),
),
WebSocketClientMessage::CursorPositions(_) => Err(unauthenticated_error(
anyhow::anyhow!("Expected a handshake message"),
)),
}
} else {
Err(unauthenticated_error(anyhow::anyhow!(