summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost/mattermost.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-24 23:22:15 +0100
committerWim <wim@42.be>2018-02-27 23:22:10 +0100
commit73525a4bbcb3cc9de33ab6d4e16ddfd038e7c7c8 (patch)
treecea5cff2c976dbb1eb8b9f00fd97d71a6856a5e6 /bridge/mattermost/mattermost.go
parentd62f49d1fc3820d791f3d7cebf4fa3b6b2857707 (diff)
downloadmatterbridge-msglm-73525a4bbcb3cc9de33ab6d4e16ddfd038e7c7c8.tar.gz
matterbridge-msglm-73525a4bbcb3cc9de33ab6d4e16ddfd038e7c7c8.tar.bz2
matterbridge-msglm-73525a4bbcb3cc9de33ab6d4e16ddfd038e7c7c8.zip
Make gometalinter happier
Diffstat (limited to 'bridge/mattermost/mattermost.go')
-rw-r--r--bridge/mattermost/mattermost.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index b94f42ba..e333580e 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -14,7 +14,7 @@ import (
type Bmattermost struct {
mh *matterhook.Client
mc *matterclient.MMClient
- TeamId string
+ TeamID string
*config.BridgeConfig
avatarMap map[string]string
}
@@ -100,7 +100,7 @@ func (b *Bmattermost) Connect() error {
go b.handleMatter()
}
if b.Config.WebhookBindAddress == "" && b.Config.WebhookURL == "" && b.Config.Login == "" && b.Config.Token == "" {
- return errors.New("No connection method found. See that you have WebhookBindAddress, WebhookURL or Token/Login/Password/Server/Team configured.")
+ return errors.New("no connection method found. See that you have WebhookBindAddress, WebhookURL or Token/Login/Password/Server/Team configured")
}
return nil
}
@@ -274,7 +274,7 @@ func (b *Bmattermost) apiLogin() error {
return err
}
flog.Info("Connection succeeded")
- b.TeamId = b.mc.GetTeamId()
+ b.TeamID = b.mc.GetTeamId()
go b.mc.WsReceiver()
go b.mc.StatusLoop()
return nil
@@ -327,7 +327,7 @@ func (b *Bmattermost) handleDownloadFile(rmsg *config.Message, id string) error
if resp.Error != nil {
return resp.Error
}
- err := helper.HandleDownloadSize(flog, rmsg, finfo.Name, int64(finfo.Size), b.General)
+ err := helper.HandleDownloadSize(flog, rmsg, finfo.Name, finfo.Size, b.General)
if err != nil {
return err
}
@@ -436,7 +436,7 @@ func (b *Bmattermost) skipMessage(message *matterclient.Message) bool {
}
// ignore messages from other teams than ours
- if message.Raw.Data["team_id"].(string) != b.TeamId {
+ if message.Raw.Data["team_id"].(string) != b.TeamID {
return true
}