mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 02:20:28 +00:00
Add documentation about breaking API changes for mattermost 3.3.0. Start work on 0.6.0-dev
This commit is contained in:
parent
32e5f396e7
commit
96e21dd051
12
README.md
12
README.md
@ -8,9 +8,14 @@ Simple bridge between mattermost and IRC.
|
||||
|
||||
This project has now [matterbridge-plus](https://github.com/42wim/matterbridge-plus/) merged in.
|
||||
Breaking changes for matterbridge can be found in [migration](https://github.com/42wim/matterbridge/blob/master/migration.md)
|
||||
Look at [matterbridge.conf.sample] (https://github.com/42wim/matterbridge/blob/master/matterbridge.conf.sample) for an example.
|
||||
|
||||
## Requirements:
|
||||
* [Mattermost] (https://github.com/mattermost/platform/) 3.x (stable, not a dev build)
|
||||
* [Mattermost] (https://github.com/mattermost/platform/)
|
||||
### Compatibility
|
||||
* Matterbridge v0.6.0 (no binaries yet) works with mattermost 3.3.0 and higher [3.3.0 release](https://github.com/mattermost/platform/releases/tag/v3.3.0)
|
||||
* Matterbridge v0.5.0 works with mattermost 3.0.0 - 3.2.0 [3.2.0 release](https://github.com/mattermost/platform/releases/tag/v3.2.0)
|
||||
|
||||
|
||||
### Webhooks version
|
||||
* Configured incoming/outgoing [webhooks](https://www.mattermost.org/webhooks/) on your mattermost instance.
|
||||
@ -19,7 +24,8 @@ Breaking changes for matterbridge can be found in [migration](https://github.com
|
||||
* A dedicated user(bot) on your mattermost instance.
|
||||
|
||||
## binaries
|
||||
Binaries can be found [here] (https://github.com/42wim/matterbridge/releases/tag/v0.5.0)
|
||||
Binaries can be found [here] (https://github.com/42wim/matterbridge/releases/)
|
||||
* For use with mattermost 3.0.0-3.2.0 [v0.5.0](https://github.com/42wim/matterircd/releases/tag/v0.5.0)
|
||||
|
||||
## building
|
||||
Go 1.6+ is required. Make sure you have [Go](https://golang.org/doc/install) properly installed, including setting up your [GOPATH] (https://golang.org/doc/code.html#GOPATH)
|
||||
@ -48,7 +54,7 @@ Usage of ./matterbridge:
|
||||
-debug
|
||||
enable debug
|
||||
-plus
|
||||
running using API instead of webhooks
|
||||
running using API instead of webhooks (deprecated, set Plus flag in [general] config)
|
||||
-version
|
||||
show version
|
||||
```
|
||||
|
@ -41,7 +41,7 @@ func initFLog() {
|
||||
flog.xmpp = log.WithFields(log.Fields{"module": "xmpp"})
|
||||
}
|
||||
|
||||
func NewBridge(name string, cfg *config.Config, kind string) *Bridge {
|
||||
func NewBridge(cfg *config.Config) error {
|
||||
c := make(chan config.Message)
|
||||
initFLog()
|
||||
b := &Bridge{}
|
||||
@ -57,8 +57,8 @@ func NewBridge(name string, cfg *config.Config, kind string) *Bridge {
|
||||
}
|
||||
b.mapChannels()
|
||||
b.mapIgnores()
|
||||
go b.handleReceive(c)
|
||||
return b
|
||||
b.handleReceive(c)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bridge) handleReceive(c chan config.Message) {
|
||||
|
@ -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 {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user