Never save a server with an empty nickname
With the address alone enough, a server added where there is neither an imported identity's nickname nor a user name (Android has no USER) got an empty nickname, which servers refuse; the form used to demand one. It falls back to "Voelin user" now, editable under Advanced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8955ceb95f
commit
f179296ec8
2 files changed
+4
-2
No files matched your search
@@ -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
|
||||
|
||||
+1
-1
@@ -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)),
|
||||
|
||||
Reference in new issue
Block a user