diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-29 18:30:43 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-29 18:34:14 +0100 |
commit | 74314696328a52779b83777eddac6bb506a3846b (patch) | |
tree | 599cf464488ee5137ab1b02d3b5d6c8381a483bc /connector/mattermost | |
parent | 2649e41c85283c680b9e1aa3294868b985aecc22 (diff) | |
download | easybridge-74314696328a52779b83777eddac6bb506a3846b.tar.gz easybridge-74314696328a52779b83777eddac6bb506a3846b.zip |
Support for external processes; stub FB messenger bridge
Diffstat (limited to 'connector/mattermost')
-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}) } } |