summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-11-13 20:40:15 +0100
committerWim <wim@42.be>2018-11-13 20:40:15 +0100
commitf7a5077d5d8dee61e86f5ec8b17b66bf257dd68c (patch)
tree1bb21167cfe0b6d68511881e40bbacf09e56b86c /bridge/mattermost
parentf8dc24bc09fc1981637ac5c4a210780ac5512944 (diff)
downloadmatterbridge-msglm-f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c.tar.gz
matterbridge-msglm-f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c.tar.bz2
matterbridge-msglm-f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c.zip
Fix goconst linter failure
Diffstat (limited to 'bridge/mattermost')
-rw-r--r--bridge/mattermost/mattermost.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index 46eac03f..26a6cb4b 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -23,6 +23,8 @@ type Bmattermost struct {
avatarMap map[string]string
}
+const mattermostPlugin = "mattermost.plugin"
+
func New(cfg *bridge.Config) bridge.Bridger {
b := &Bmattermost{Config: cfg, avatarMap: make(map[string]string)}
b.uuid = xid.New().String()
@@ -34,7 +36,7 @@ func (b *Bmattermost) Command(cmd string) string {
}
func (b *Bmattermost) Connect() error {
- if b.Account == "mattermost.plugin" {
+ if b.Account == mattermostPlugin {
return nil
}
if b.GetString("WebhookBindAddress") != "" {
@@ -113,7 +115,7 @@ func (b *Bmattermost) Disconnect() error {
}
func (b *Bmattermost) JoinChannel(channel config.ChannelInfo) error {
- if b.Account == "mattermost.plugin" {
+ if b.Account == mattermostPlugin {
return nil
}
// we can only join channels using the API
@@ -128,7 +130,7 @@ func (b *Bmattermost) JoinChannel(channel config.ChannelInfo) error {
}
func (b *Bmattermost) Send(msg config.Message) (string, error) {
- if b.Account == "mattermost.plugin" {
+ if b.Account == mattermostPlugin {
return "", nil
}
b.Log.Debugf("=> Receiving %#v", msg)