From 563482db729afbd6ea242b2c01e9c508c6f2a265 Mon Sep 17 00:00:00 2001 From: faumaray Date: Sat, 24 Oct 2026 14:17:16 +0300 Subject: [PATCH] Document VoiceOptions.nickname and server_password; correct Backends::set_account Both fields were carried over from ConnectOptions without a doc: what the nickname is on each kind of server and that an empty one falls back to the link's nickname parameter; that the server password is Hello.password, falls back to the link's password parameter and is not the channel's. Backends::set_account said the connectors use the account (the QUIC connector's certificate, the TeamSpeak connector's myTS ID proof). No connector reads ConnectParams.account yet: the TeamSpeak one is given the myTeamSpeak account through TsConnector's setters, and the QUIC connector does not exist. The doc says so and names H4 as the step that moves the proof to this hook. Co-Authored-By: Claude Sonnet 5.5 --- crates/voelin-core/src/link/backends.rs | 10 +++++++--- crates/voelin-core/src/link/mod.rs | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/crates/voelin-core/src/link/backends.rs b/crates/voelin-core/src/link/backends.rs index afabc1d..951a697 100644 --- a/crates/voelin-core/src/link/backends.rs +++ b/crates/voelin-core/src/link/backends.rs @@ -166,9 +166,13 @@ impl Backends { self.register_local(Arc::new(connector)); } - /// The device's Voelin account, for the connectors that use it (the QUIC - /// connector's certificate, the TeamSpeak connector's myTS ID proof). - /// None is the default: nothing uses an account yet. + /// The device's Voelin account, which every connect hands the connector as + /// `ConnectParams::account`. No connector reads it yet: the TeamSpeak + /// connector takes the myTeamSpeak account it presents from its own setters + /// ([`TsConnector::set_myts_identity`], [`TsConnector::set_myts_data`]), and a + /// Voelin host's connector (the QUIC one, for its certificate) does not exist + /// yet. Follow-up H4 of `docs/session-seam.md` (11.2) moves the myTeamSpeak + /// proof from those setters to this hook. None is the default. pub fn set_account(&mut self, agent: Option>) { self.account = agent; } diff --git a/crates/voelin-core/src/link/mod.rs b/crates/voelin-core/src/link/mod.rs index 0010497..e83203b 100644 --- a/crates/voelin-core/src/link/mod.rs +++ b/crates/voelin-core/src/link/mod.rs @@ -64,6 +64,10 @@ pub struct VoiceOptions { /// scheme (`ts3server://`, `teamspeak://`, a Voelin host's `voelin://`) /// that picks the connector ([`Backends`]). pub address: String, + /// The name shown on the server: `Hello.nickname` to a Voelin host, the + /// client name on a TeamSpeak server (which may refuse or change it). When + /// it is empty, the `nickname` parameter of an `address` that is a + /// TeamSpeak link applies. pub nickname: String, /// The identity to connect with: a TeamSpeak identity /// ([`crate::ts::identity::to_blob`]) for a TeamSpeak server, a Voelin key @@ -76,6 +80,10 @@ pub struct VoiceOptions { /// `@`); `None` is the native platform's. A spec that is /// none ends the connect with the reason. Other backends ignore it. pub client_version: Option, + /// The password of the server (`Hello.password`), for one that has a + /// password. When it is `None` or empty, the `password` parameter of an + /// `address` that is a TeamSpeak link applies. Not the password of + /// `channel` (that is `channel_password`). pub server_password: Option, /// Channel path to join, e.g. `Lobby/Sub`, or `/`. pub channel: Option,