Enable errcheck linter (#646)

This commit is contained in:
Duco van Amstel
2018-12-08 16:04:10 +00:00
committed by Wim
parent b6d81f34ba
commit a2754f15fc
7 changed files with 37 additions and 25 deletions

View File

@@ -53,7 +53,9 @@ func (m *MMClient) parseMessage(rmsg *Message) {
m.UpdateUser(user["id"].(string))
}
case "group_added":
m.UpdateChannels()
if err := m.UpdateChannels(); err != nil {
m.log.Errorf("failed to update channels: %#v", err)
}
/*
case model.ACTION_USER_REMOVED:
m.handleWsActionUserRemoved(&rmsg)
@@ -186,7 +188,9 @@ func (m *MMClient) SendDirectMessageProps(toUserId string, msg string, props map
channelName := model.GetDMNameFromIds(toUserId, m.User.Id)
// update our channels
m.UpdateChannels()
if err := m.UpdateChannels(); err != nil {
m.log.Errorf("failed to update channels: %#v", err)
}
// build & send the message
msg = strings.Replace(msg, "\r", "", -1)