4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Fix golint linter issues and enable it in CI (#593)

This commit is contained in:
Duco van Amstel
2018-11-15 19:43:43 +00:00
committed by Wim
parent c89085bf44
commit ce21ba1545
24 changed files with 147 additions and 145 deletions

View File

@ -51,7 +51,7 @@ func (b *Bxmpp) Connect() error {
time.Sleep(d)
b.xc, err = b.createXMPP()
if err == nil {
b.Remote <- config.Message{Username: "system", Text: "rejoin", Channel: "", Account: b.Account, Event: config.EVENT_REJOIN_CHANNELS}
b.Remote <- config.Message{Username: "system", Text: "rejoin", Channel: "", Account: b.Account, Event: config.EventRejoinChannels}
b.handleXMPP()
bf.Reset()
}
@ -76,7 +76,7 @@ func (b *Bxmpp) JoinChannel(channel config.ChannelInfo) error {
func (b *Bxmpp) Send(msg config.Message) (string, error) {
// ignore delete messages
if msg.Event == config.EVENT_MSG_DELETE {
if msg.Event == config.EventMsgDelete {
return "", nil
}
b.Log.Debugf("=> Receiving %#v", msg)
@ -177,7 +177,7 @@ func (b *Bxmpp) handleXMPP() error {
// check if we have an action event
rmsg.Text, ok = b.replaceAction(rmsg.Text)
if ok {
rmsg.Event = config.EVENT_USER_ACTION
rmsg.Event = config.EventUserAction
}
b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account)
b.Log.Debugf("<= Message is %#v", rmsg)