diff options
author | Wim <wim@42.be> | 2015-10-25 01:00:19 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2015-10-25 01:00:19 +0200 |
commit | 8b6a00d1c58ee505fa1f5515d561eb909cb8063a (patch) | |
tree | 989fd9184a815f8d3581b77f889d0deb73420e3b /matterbridge.go | |
parent | 43738dbc89c888967181309002dc46b2c64990a0 (diff) | |
download | matterbridge-msglm-8b6a00d1c58ee505fa1f5515d561eb909cb8063a.tar.gz matterbridge-msglm-8b6a00d1c58ee505fa1f5515d561eb909cb8063a.tar.bz2 matterbridge-msglm-8b6a00d1c58ee505fa1f5515d561eb909cb8063a.zip |
Add SkipTLSVerify option for mattermost, allows selfsigned certificates
Diffstat (limited to 'matterbridge.go')
-rw-r--r-- | matterbridge.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/matterbridge.go b/matterbridge.go index 94d38954..4a36e80b 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -20,7 +20,8 @@ func NewBridge(name string, config *Config) *Bridge { b := &Bridge{} b.Config = config b.m = matterhook.New(b.Config.Mattermost.URL, - matterhook.Config{Port: b.Config.Mattermost.Port, Token: b.Config.Mattermost.Token}) + matterhook.Config{Port: b.Config.Mattermost.Port, Token: b.Config.Mattermost.Token, + InsecureSkipVerify: b.Config.Mattermost.SkipTLSVerify}) b.i = b.createIRC(name) go b.handleMatter() return b @@ -68,7 +69,11 @@ func (b *Bridge) Send(nick string, message string) error { matterMessage := matterhook.OMessage{IconURL: b.Config.Mattermost.IconURL} matterMessage.UserName = nick matterMessage.Text = message - b.m.Send(matterMessage) + err := b.m.Send(matterMessage) + if err != nil { + log.Println(err) + return err + } return nil } |