Skip to content

Commit

Permalink
Don't prompt relay URL by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 20, 2023
1 parent 4c3bd62 commit f30df5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bridgeconfig/imessagego.tpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bridge:
{{ .BeeperDomain }}: "as_token:{{ .ASToken }}"

# A URL to fetch validation data from. Use this option or the nac_plist option
nac_validation_data_url: {{ .Params.nac_url }}
nac_validation_data_url: {{ or .Params.nac_url "https://registration-relay.beeper.com" }}
# Optional auth token to use when fetching validation data. If null, defaults to passing the as_token.
nac_validation_data_token: {{ .Params.nac_token }}
nac_validation_is_relay: true
Expand Down
14 changes: 1 addition & 13 deletions cmd/bbctl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,11 @@ func simpleDescriptions(descs map[string]string) func(string, int) string {

var askParams = map[string]func(map[string]string) (bool, error){
"imessagego": func(extraParams map[string]string) (bool, error) {
nacURL := extraParams["nac_url"]
nacToken := extraParams["nac_token"]
var didAddParams bool
if nacURL == "" {
err := survey.AskOne(&survey.Input{
Message: "Enter registration relay address",
Default: "https://registration-relay.beeper.com",
}, &nacURL)
if err != nil {
return didAddParams, err
}
extraParams["nac_url"] = nacURL
didAddParams = true
}
if nacToken == "" {
err := survey.AskOne(&survey.Input{
Message: "Enter iMessage registration token",
Message: "Enter iMessage registration code",
}, &nacToken)
if err != nil {
return didAddParams, err
Expand Down

0 comments on commit f30df5c

Please sign in to comment.