mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-10 03:10:26 +00:00
Cleanup xmpp bridge debug/info messages
This commit is contained in:
parent
002c5fd0d1
commit
11f4a6897a
@ -37,7 +37,7 @@ func New(config config.Protocol, origin string, c chan config.Message) *Bxmpp {
|
|||||||
|
|
||||||
func (b *Bxmpp) Connect() error {
|
func (b *Bxmpp) Connect() error {
|
||||||
var err error
|
var err error
|
||||||
flog.Info("Trying XMPP connection")
|
flog.Infof("Connecting %s", b.Config.Server)
|
||||||
b.xc, err = b.createXMPP()
|
b.xc, err = b.createXMPP()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
flog.Debugf("%#v", err)
|
flog.Debugf("%#v", err)
|
||||||
@ -70,6 +70,7 @@ func (b *Bxmpp) Origin() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *Bxmpp) Send(msg config.Message) error {
|
func (b *Bxmpp) Send(msg config.Message) error {
|
||||||
|
flog.Debugf("Receiving %#v", msg)
|
||||||
b.xc.Send(xmpp.Chat{Type: "groupchat", Remote: msg.Channel + "@" + b.Config.Muc, Text: msg.Username + msg.Text})
|
b.xc.Send(xmpp.Chat{Type: "groupchat", Remote: msg.Channel + "@" + b.Config.Muc, Text: msg.Username + msg.Text})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -126,7 +127,7 @@ func (b *Bxmpp) handleXmpp() error {
|
|||||||
nick = s[1]
|
nick = s[1]
|
||||||
}
|
}
|
||||||
if nick != b.Config.Nick {
|
if nick != b.Config.Nick {
|
||||||
flog.Infof("sending message to remote %s %s %s", nick, v.Text, channel)
|
flog.Debugf("Sending message from %s on %s to gateway", nick, b.FullOrigin())
|
||||||
b.Remote <- config.Message{Username: nick, Text: v.Text, Channel: channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
|
b.Remote <- config.Message{Username: nick, Text: v.Text, Channel: channel, Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user