Skip to content

Commit

Permalink
Update allowed platforms for meta bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Apr 2, 2024
1 parent e5f0ce7 commit 9dc4333
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/bbctl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,22 @@ var askParams = map[string]func(string, map[string]string) (bool, error){
if metaPlatform == "" {
if strings.Contains(bridgeName, "facebook") {
extraParams["meta_platform"] = "facebook"
} else if strings.Contains(bridgeName, "messenger") {
extraParams["meta_platform"] = "messenger"
} else if strings.Contains(bridgeName, "instagram") {
extraParams["meta_platform"] = "instagram"
} else {
err := survey.AskOne(&survey.Select{
Message: "Which Meta platform do you want to bridge?",
Options: []string{"instagram", "facebook"},
Options: []string{"instagram", "facebook", "facebook-tor", "messenger"},
}, &metaPlatform)
if err != nil {
return false, err
}
extraParams["meta_platform"] = metaPlatform
return true, nil
}
} else if metaPlatform != "instagram" && metaPlatform != "facebook" {
} else if metaPlatform != "instagram" && metaPlatform != "facebook" && metaPlatform != "facebook-tor" && metaPlatform != "messenger" {
return false, UserError{"Invalid Meta platform specified"}
}
return false, nil
Expand Down

0 comments on commit 9dc4333

Please sign in to comment.