mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-29 16:39:45 +00:00
(feature): remove spaces from conferenceId
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user