Thumbnail

rani/matterbridge.git

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

commit 06e365f909065087c7646042af92eaa49e40be9a Author: Wim <wim@42.be> Date: Fri Jan 26 21:54:09 2018 +0000 Print only debug messages when specified (xmpp). Closes #345 diff --git a/bridge/config/config.go b/bridge/config/config.go index 13b7a8d..af3bf03 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -536 +537 @@ type Protocol struct {   BindAddress string // mattermost, slack // DEPRECATED   Buffer int // api   Charset string // irc + Debug bool // general   EditSuffix string // mattermost, slack, discord, telegram, gitter   EditDisable bool // mattermost, slack, discord, telegram, gitter   IconURL string // mattermost, slack diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index 0ad7699..63a1048 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -1107 +1107 @@ func (b *Bxmpp) createXMPP() (*xmpp.Client, error) {   TLSConfig: tc,     //StartTLS: false, - Debug: true, + Debug: b.General.Debug,   Session: true,   Status: "",   StatusMessage: "", diff --git a/matterbridge.go b/matterbridge.go index 397497c..e755ea7 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -436 +437 @@ func main() {   log.Println("WARNING: THIS IS A DEVELOPMENT VERSION. Things may break.")   }   cfg := config.NewConfig(*flagConfig) + cfg.General.Debug = *flagDebug   r, err := gateway.NewRouter(cfg)   if err != nil {   log.Fatalf("Starting gateway failed: %s", err)