Skip to content

Commit

Permalink
Improve bridge type guessing hack
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jan 11, 2024
1 parent 6e34d54 commit 283a53d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/bbctl/bridgeutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ func validateBridgeName(ctx *cli.Context, bridge string) error {

func guessOrAskBridgeType(bridge, bridgeType string) (string, error) {
// Hack because the officialBridges map is unordered
if strings.Contains(bridge, "imessagego") && bridgeType == "" {
bridgeType = "imessagego"
if bridgeType == "" {
if strings.Contains(bridge, "imessagego") {
bridgeType = "imessagego"
} else if strings.Contains(bridge, "imessage") {
bridgeType = "imessage"
}
}
if bridgeType == "" {
for key, value := range officialBridges {
Expand Down

0 comments on commit 283a53d

Please sign in to comment.