From 7a1f81cd52c4b58a058ae11e361a80ee3b24d141 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 5 Dec 2017 09:14:03 -0500 Subject: Add GetChannelMember method to plugin API (#7930) --- plugin/plugintest/api.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugin/plugintest/api.go') diff --git a/plugin/plugintest/api.go b/plugin/plugintest/api.go index a4abbbca3..b00542032 100644 --- a/plugin/plugintest/api.go +++ b/plugin/plugintest/api.go @@ -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 { -- cgit v1.2.3-1-g7c22