aboutsummaryrefslogtreecommitdiff
path: root/connector
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-21 19:50:55 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-21 19:50:55 +0100
commitd7552b43cd48abe85f5b8c631cdb4a828f3f9c32 (patch)
treecdff4524f1550e93ba32bf2e23a02026a5574b36 /connector
parenta14bacc9c13309593c6eab2d19b70bcd315d193d (diff)
downloadeasybridge-d7552b43cd48abe85f5b8c631cdb4a828f3f9c32.tar.gz
easybridge-d7552b43cd48abe85f5b8c631cdb4a828f3f9c32.zip
Fix fetching room/user pictures
Diffstat (limited to 'connector')
-rw-r--r--connector/mattermost/mattermost.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go
index ab612ba..922a3ae 100644
--- a/connector/mattermost/mattermost.go
+++ b/connector/mattermost/mattermost.go
@@ -321,8 +321,8 @@ func (mm *Mattermost) handleConnected() {
t.Team.LastTeamIconUpdate),
GetFn: func(o *LazyBlobMediaObject) error {
team_img, resp := mm.conn.Client.GetTeamIcon(t.Id, "")
- if resp.Error == nil {
- log.Warnf("Could not get team image: %s", resp.Error)
+ if resp.Error != nil {
+ log.Warnf("Could not get team image: %s", resp.Error.Error())
return resp.Error
}
o.ObjectData = team_img
@@ -353,7 +353,7 @@ func (mm *Mattermost) handleConnected() {
}
}
} else {
- log.Warnf("Could not get channel members: %s", resp.Error)
+ log.Warnf("Could not get channel members: %s", resp.Error.Error())
}
// Read backlog
@@ -411,8 +411,8 @@ func (mm *Mattermost) updateUserInfo(user *model.User) {
user.LastPictureUpdate),
GetFn: func(o *LazyBlobMediaObject) error {
img, resp := mm.conn.Client.GetProfileImage(user.Id, "")
- if resp.Error == nil {
- log.Warnf("Could not get profile picture: %s", resp.Error)
+ if resp.Error != nil {
+ log.Warnf("Could not get profile picture: %s", resp.Error.Error())
return resp.Error
}
o.ObjectData = img