summaryrefslogtreecommitdiffstats
path: root/matterclient
diff options
context:
space:
mode:
Diffstat (limited to 'matterclient')
-rw-r--r--matterclient/matterclient.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index 93fb7cad..21943566 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -470,11 +470,16 @@ 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()