From 77f3da1eaf5b7ca7d53fd324e3c669ed4f87003e Mon Sep 17 00:00:00 2001 From: Daniel Hodan Date: Wed, 17 Oct 2018 23:06:14 +0200 Subject: GH-9608: Add GetUsersInChannel to plugin API (#9643) * add GetUsersInChannel to plugin api * compute offset value instead of page * Add version comment --- app/plugin_api.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/plugin_api.go b/app/plugin_api.go index 85bcc0660..3574c0298 100644 --- a/app/plugin_api.go +++ b/app/plugin_api.go @@ -294,6 +294,10 @@ func (api *PluginAPI) DeleteChannelMember(channelId, userId string) *model.AppEr return api.app.LeaveChannel(channelId, userId) } +func (api *PluginAPI) GetUsersInChannel(channelId string, page int, perPage int) ([]*model.User, *model.AppError) { + return api.app.GetUsersInChannel(channelId, page*perPage, perPage) +} + func (api *PluginAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError) { return api.app.CreatePostMissingChannel(post, true) } -- cgit v1.2.3-1-g7c22