init name from config if empty

This commit is contained in:
Green Sky 2024-06-12 21:06:24 +02:00
parent bb9da772bc
commit 4a59a83eca
No known key found for this signature in database

View File

@ -213,7 +213,7 @@ int main(int argc, char** argv) {
{ // name stuff
auto name = tc.toxSelfGetName();
if (name.empty()) {
name = "totato";
name = conf.get_string("tox", "name").value_or("totato");
}
conf.set("tox", "name", name);
tc.setSelfName(name); // TODO: this is ugly