func getConfig() (*textsecure.Config, error) { configFile = filepath.Join(configDir, "config.yml") cf := configFile if isPhone { configDir = filepath.Join("/opt/click.ubuntu.com", appName, "current") if !exists(configFile) { cf = filepath.Join(configDir, "config.yml") } } var err error if exists(cf) { config, err = textsecure.ReadConfig(cf) } else { config = &textsecure.Config{} } config.StorageDir = storageDir config.UserAgent = fmt.Sprintf("TextSecure %s for Ubuntu Phone", appVersion) config.UnencryptedStorage = true config.LogLevel = "debug" config.AlwaysTrustPeerID = true rootCA := filepath.Join(configDir, "rootCA.crt") if exists(rootCA) { config.RootCA = rootCA } return config, err }
func getConfig() (*textsecure.Config, error) { return textsecure.ReadConfig(configDir + "/config.yml") }
func getConfig() (*textsecure.Config, error) { return textsecure.ReadConfig(".config/config.yml") }
// get Config file, pass to the ts library func getConfig() (*ts.Config, error) { return ts.ReadConfig(".config/config.yml") }