diff options
Diffstat (limited to 'connector/mattermost/mattermost.go')
-rw-r--r-- | connector/mattermost/mattermost.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go index 52eb40f..e5b5bc9 100644 --- a/connector/mattermost/mattermost.go +++ b/connector/mattermost/mattermost.go @@ -210,7 +210,7 @@ func (mm *Mattermost) SetRoomInfo(roomId RoomID, info *RoomInfo) error { mm.conn.UpdateChannelHeader(ch, info.Topic) } - if info.Picture != nil { + if MediaObject(info.Picture) != nil { err = fmt.Errorf("Not supported: channel picture on mattermost") } @@ -374,7 +374,7 @@ func (mm *Mattermost) initSyncChannel(ch *model.Channel) { room_info.Name = t.Team.Name + " / " + room_info.Name } if t.Team.LastTeamIconUpdate > 0 { - room_info.Picture = &LazyBlobMediaObject{ + room_info.Picture = SMediaObject{&LazyBlobMediaObject{ ObjectFilename: fmt.Sprintf("%s-%d", t.Team.Name, t.Team.LastTeamIconUpdate), @@ -388,7 +388,7 @@ func (mm *Mattermost) initSyncChannel(ch *model.Channel) { o.ObjectMimetype = http.DetectContentType(team_img) return nil }, - } + }} } break } @@ -487,7 +487,7 @@ func (mm *Mattermost) updateUserInfo(user *model.User) { DisplayName: userDisp, } if user.LastPictureUpdate > 0 { - ui.Avatar = &LazyBlobMediaObject{ + ui.Avatar = SMediaObject{&LazyBlobMediaObject{ ObjectFilename: fmt.Sprintf("%s-%d", user.Username, user.LastPictureUpdate), @@ -501,7 +501,7 @@ func (mm *Mattermost) updateUserInfo(user *model.User) { o.ObjectMimetype = http.DetectContentType(img) return nil }, - } + }} } mm.handler.UserInfoUpdated(userId, ui) mm.caches.displayname[userId] = userDisp @@ -567,7 +567,7 @@ func (mm *Mattermost) handlePost(channel_name string, post *model.Post, only_mes // Handle files if post.FileIds != nil && len(post.FileIds) > 0 { - msg_ev.Attachments = []MediaObject{} + msg_ev.Attachments = []SMediaObject{} for _, file := range post.Metadata.Files { media_object := &LazyBlobMediaObject{ ObjectFilename: file.Name, @@ -587,7 +587,7 @@ func (mm *Mattermost) handlePost(channel_name string, post *model.Post, only_mes Height: file.Height, } } - msg_ev.Attachments = append(msg_ev.Attachments, media_object) + msg_ev.Attachments = append(msg_ev.Attachments, SMediaObject{media_object}) } } |