summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-08-15 21:11:50 +0200
committerWim <wim@42.be>2016-08-15 21:11:50 +0200
commit96e21dd0511cd08ca2d9581a5c7299e91a2ea984 (patch)
treec84aa50a2b635b6dc7ec37d4f5460a78ce2ec667 /matterbridge.go
parent32e5f396e75927f10623ecdf8446a070506385eb (diff)
downloadmatterbridge-msglm-96e21dd0511cd08ca2d9581a5c7299e91a2ea984.tar.gz
matterbridge-msglm-96e21dd0511cd08ca2d9581a5c7299e91a2ea984.tar.bz2
matterbridge-msglm-96e21dd0511cd08ca2d9581a5c7299e91a2ea984.zip
Add documentation about breaking API changes for mattermost 3.3.0. Start work on 0.6.0-dev
Diffstat (limited to 'matterbridge.go')
-rw-r--r--matterbridge.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/matterbridge.go b/matterbridge.go
index 689a08df..58916a65 100644
--- a/matterbridge.go
+++ b/matterbridge.go
@@ -8,7 +8,7 @@ import (
log "github.com/Sirupsen/logrus"
)
-var version = "0.5.0-beta2"
+var version = "0.6.0-dev"
func init() {
log.SetFormatter(&log.TextFormatter{FullTimestamp: true})
@@ -18,7 +18,7 @@ func main() {
flagConfig := flag.String("conf", "matterbridge.conf", "config file")
flagDebug := flag.Bool("debug", false, "enable debug")
flagVersion := flag.Bool("version", false, "show version")
- flagPlus := flag.Bool("plus", false, "running using API instead of webhooks")
+ flagPlus := flag.Bool("plus", false, "running using API instead of webhooks (deprecated, set Plus flag in [general] config)")
flag.Parse()
if *flagVersion {
fmt.Println("version:", version)
@@ -30,10 +30,12 @@ func main() {
log.SetLevel(log.DebugLevel)
}
fmt.Println("running version", version)
+ cfg := config.NewConfig(*flagConfig)
if *flagPlus {
- bridge.NewBridge("matterbot", config.NewConfig(*flagConfig), "")
- } else {
- bridge.NewBridge("matterbot", config.NewConfig(*flagConfig), "legacy")
+ cfg.General.Plus = true
+ }
+ err := bridge.NewBridge(cfg)
+ if err != nil {
+ log.Debugf("starting bridge failed %#v", err)
}
- select {}
}