Add GetChannelMember method to plugin API (#7930)

Этот коммит содержится в:
Joram Wilander
2017-12-05 09:14:03 -05:00
коммит произвёл GitHub
родитель 46f51197fb
Коммит 7a1f81cd52
5 изменённых файлов: 57 добавлений и 0 удалений

Просмотреть файл

@@ -207,6 +207,16 @@ func (m *API) UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppE
return channelOut, err
}
func (m *API) GetChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError) {
ret := m.Called(channelId, userId)
if f, ok := ret.Get(0).(func(_, _ string) (*model.ChannelMember, *model.AppError)); ok {
return f(channelId, userId)
}
member, _ := ret.Get(0).(*model.ChannelMember)
err, _ := ret.Get(1).(*model.AppError)
return member, err
}
func (m *API) CreatePost(post *model.Post) (*model.Post, *model.AppError) {
ret := m.Called(post)
if f, ok := ret.Get(0).(func(*model.Post) (*model.Post, *model.AppError)); ok {