diff --git a/ui/config.go b/ui/config.go index 329d15f..f2b70a4 100644 --- a/ui/config.go +++ b/ui/config.go @@ -4,6 +4,7 @@ import ( "encoding/json" "os" "path/filepath" + "strings" ) type Config struct { @@ -51,6 +52,7 @@ func (p *Program) loadConfig() *Config { log("WARNING: Could not parse config file: %v", err) return cfg } + cfg.ConferenceID = strings.ReplaceAll(cfg.ConferenceID, " ", "") log("Config loaded successfully") return cfg } @@ -58,6 +60,8 @@ func (p *Program) loadConfig() *Config { func (p *Program) saveConfig(dns, encryptionKey, socksPort, conferenceID string) { log("Saving configuration...") + conferenceID = strings.ReplaceAll(conferenceID, " ", "") + p.Config = &Config{ DNS: dns, EncryptionKey: encryptionKey,