Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 2f2f1e084d04bde15f593c6948f1e54a08596b8d Author: Wim <wim@42.be> Date: Fri Feb 03 16:43:21 2017 +0000 Add more error checking diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index 93fb7ca..2194356 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -47011 +47016 @@ func (m *MMClient) SendDirectMessage(toUserId string, msg string) {   _, err := m.Client.CreateDirectChannel(toUserId)   if err != nil {   m.log.Debugf("SendDirectMessage to %#v failed: %s", toUserId, err) + return   }   channelName := model.GetDMNameFromIds(toUserId, m.User.Id)     // update our channels - mmchannels, _ := m.Client.GetChannels("") + mmchannels, err := m.Client.GetChannels("") + if err != nil { + m.log.Debug("SendDirectMessage: Couldn't update channels") + return + }   m.Lock()   m.Team.Channels = mmchannels.Data.(*model.ChannelList)   m.Unlock()