Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 21bc579e37d0a54204ab7f00edddb1476d2cf547 Author: Wim <wim@42.be> Date: Tue Feb 26 18:03:50 2019 +0000 Fail gracefully on incorrect human input. Fixes #739 (#740) diff --git a/gateway/gateway.go b/gateway/gateway.go index cb7d94c..be45086 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -926 +929 @@ func (gw *Gateway) AddBridge(cfg *config.Bridge) error {   Bridge: br,   }   // add the actual bridger for this protocol to this bridge using the bridgeMap + if _, ok := gw.Router.BridgeMap[br.Protocol]; !ok { + gw.logger.Fatalf("Incorrect protocol %s specified in gateway configuration %s, exiting.", br.Protocol, cfg.Account) + }   br.Bridger = gw.Router.BridgeMap[br.Protocol](brconfig)   }   gw.mapChannelsToBridge(br)