diff options
author | Daniel Hodan <daniel.hodan@czertbytes.de> | 2018-10-17 23:06:14 +0200 |
---|---|---|
committer | Jesse Hallam <jesse.hallam@gmail.com> | 2018-10-17 17:06:14 -0400 |
commit | 77f3da1eaf5b7ca7d53fd324e3c669ed4f87003e (patch) | |
tree | 9b6496d5fed9f2b765cce24b60a47eda7482f8b5 /app | |
parent | 819ab451f1806db640698f8e0513a7269f32c307 (diff) | |
download | chat-77f3da1eaf5b7ca7d53fd324e3c669ed4f87003e.tar.gz chat-77f3da1eaf5b7ca7d53fd324e3c669ed4f87003e.tar.bz2 chat-77f3da1eaf5b7ca7d53fd324e3c669ed4f87003e.zip |
GH-9608: Add GetUsersInChannel to plugin API (#9643)
* add GetUsersInChannel to plugin api
* compute offset value instead of page
* Add version comment
Diffstat (limited to 'app')
-rw-r--r-- | app/plugin_api.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) } |