diff options
author | Wim <wim@42.be> | 2018-11-13 20:40:15 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-11-13 20:40:15 +0100 |
commit | f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c (patch) | |
tree | 1bb21167cfe0b6d68511881e40bbacf09e56b86c /bridge/mattermost/mattermost.go | |
parent | f8dc24bc09fc1981637ac5c4a210780ac5512944 (diff) | |
download | matterbridge-msglm-f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c.tar.gz matterbridge-msglm-f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c.tar.bz2 matterbridge-msglm-f7a5077d5d8dee61e86f5ec8b17b66bf257dd68c.zip |
Fix goconst linter failure
Diffstat (limited to 'bridge/mattermost/mattermost.go')
-rw-r--r-- | bridge/mattermost/mattermost.go | 8 |
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) |