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
|
||||
|
||||
Reference in new issue
Block a user