summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-02-09 00:11:20 +0100
committerWim <wim@42.be>2018-02-09 00:11:20 +0100
commit8be107cecc9ed68c7f97ec7561b2a7eeee9ce791 (patch)
treeaf522fb2dedea97a9e6fa81b84bd83ff466ed151
parent5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811 (diff)
downloadmatterbridge-msglm-8be107cecc9ed68c7f97ec7561b2a7eeee9ce791.tar.gz
matterbridge-msglm-8be107cecc9ed68c7f97ec7561b2a7eeee9ce791.tar.bz2
matterbridge-msglm-8be107cecc9ed68c7f97ec7561b2a7eeee9ce791.zip
Fix mattermost API change
-rw-r--r--matterclient/matterclient.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index e43fd223..8d9f6a37 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -585,9 +585,9 @@ func (m *MMClient) UpdateChannelHeader(channelId string, header string) {
func (m *MMClient) UpdateLastViewed(channelId string) {
m.log.Debugf("posting lastview %#v", channelId)
view := &model.ChannelView{ChannelId: channelId}
- res, _ := m.Client.ViewChannel(m.User.Id, view)
- if !res {
- m.log.Errorf("ChannelView update for %s failed", channelId)
+ _, resp := m.Client.ViewChannel(m.User.Id, view)
+ if resp.Error != nil {
+ m.log.Errorf("ChannelView update for %s failed: %s", channelId, resp.Error)
}
}