summaryrefslogtreecommitdiffstats
path: root/bridge/slack/handlers.go
diff options
context:
space:
mode:
authorDuco van Amstel <duco.vanamstel@gmail.com>2018-11-15 19:43:43 +0000
committerWim <wim@42.be>2018-11-15 20:43:43 +0100
commitce21ba154585395e792c059ac156299071405247 (patch)
treef76f4617cc2c099a9a2e97bc85fce28cf04010b1 /bridge/slack/handlers.go
parentc89085bf44333b4decd75e30cec5849dca859938 (diff)
downloadmatterbridge-msglm-ce21ba154585395e792c059ac156299071405247.tar.gz
matterbridge-msglm-ce21ba154585395e792c059ac156299071405247.tar.bz2
matterbridge-msglm-ce21ba154585395e792c059ac156299071405247.zip
Fix golint linter issues and enable it in CI (#593)
Diffstat (limited to 'bridge/slack/handlers.go')
-rw-r--r--bridge/slack/handlers.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/bridge/slack/handlers.go b/bridge/slack/handlers.go
index ef7364f6..d4e5e464 100644
--- a/bridge/slack/handlers.go
+++ b/bridge/slack/handlers.go
@@ -22,7 +22,7 @@ func (b *Bslack) handleSlack() {
time.Sleep(time.Second)
b.Log.Debug("Start listening for Slack messages")
for message := range messages {
- if message.Event != config.EVENT_USER_TYPING {
+ if message.Event != config.EventUserTyping {
b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account)
}
@@ -199,18 +199,18 @@ func (b *Bslack) handleStatusEvent(ev *slack.MessageEvent, rmsg *config.Message)
return true
case sChannelJoin, sChannelLeave:
rmsg.Username = sSystemUser
- rmsg.Event = config.EVENT_JOIN_LEAVE
+ rmsg.Event = config.EventJoinLeave
case sChannelTopic, sChannelPurpose:
- rmsg.Event = config.EVENT_TOPIC_CHANGE
+ rmsg.Event = config.EventTopicChange
case sMessageDeleted:
- rmsg.Text = config.EVENT_MSG_DELETE
- rmsg.Event = config.EVENT_MSG_DELETE
+ rmsg.Text = config.EventMsgDelete
+ rmsg.Event = config.EventMsgDelete
rmsg.ID = "slack " + ev.DeletedTimestamp
// If a message is being deleted we do not need to process
// the event any further so we return 'true'.
return true
case sMeMessage:
- rmsg.Event = config.EVENT_USER_ACTION
+ rmsg.Event = config.EventUserAction
}
return false
}
@@ -256,7 +256,7 @@ func (b *Bslack) handleTypingEvent(ev *slack.UserTypingEvent) (*config.Message,
return &config.Message{
Channel: channelInfo.Name,
Account: b.Account,
- Event: config.EVENT_USER_TYPING,
+ Event: config.EventUserTyping,
}, nil
}