diff --git a/crates/voelin-ui/src/servers.rs b/crates/voelin-ui/src/servers.rs index 7df7241..14107db 100644 --- a/crates/voelin-ui/src/servers.rs +++ b/crates/voelin-ui/src/servers.rs @@ -113,7 +113,9 @@ impl App { .contains(&name.as_str()) }) .or_else(|| std::env::var("USER").or_else(|_| std::env::var("USERNAME")).ok()) - .unwrap_or_default() + // Servers refuse an empty nickname (Android has no user name). + .filter(|name| !name.trim().is_empty()) + .unwrap_or_else(|| "Voelin user".to_owned()) } /// Look up the gateway of a server that has none in DNS diff --git a/docs/ui.md b/docs/ui.md index 77e6784..6b570b8 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -209,7 +209,7 @@ an optional server password. *Advanced* (open when editing) has the rest, and empty fields there are filled in: the name is the address until the first connection, then the server's own name (`adopt_server_name`); the nickname is the default identity's (one imported from TeamSpeak keeps its -nickname there), else the system user's; the identity is the default one, +nickname there), else the system user's, else "Voelin user"; the identity is the default one, there is no default channel; the gateway is looked up in DNS when the server is saved without one and when it connects ([gateway-admin.md](gateway-admin.md#letting-voelin-find-the-gateway)),