Skip to main content

cmd_join

Function cmd_join 

Source
pub async fn cmd_join(username: &str, socket: Option<&Path>) -> Result<()>
Expand description

One-shot join subcommand: register username globally, receive token, write token file.

Writes to ~/.room/state/room-<username>.token. The token is global — not tied to any specific room. Use room subscribe <room> to join rooms.

If the username is already registered, returns the existing token.

socket overrides the default socket path (auto-discovered if None).