Added the SearchPostsInTeam method to the plugin API (#10106)

Этот коммит содержится в:
Andrew Braunstein
2019-02-12 22:41:32 -08:00
коммит произвёл Hanzei
родитель 87e36a3ecf
Коммит c08fda1337
11 изменённых файлов: 197 добавлений и 31 удалений

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

@@ -342,6 +342,14 @@ func (api *PluginAPI) SearchUsers(search *model.UserSearch) ([]*model.User, *mod
return api.app.SearchUsers(search, pluginSearchUsersOptions)
}
func (api *PluginAPI) SearchPostsInTeam(teamId string, paramsList []*model.SearchParams) ([]*model.Post, *model.AppError) {
postList, err := api.app.SearchPostsInTeam(teamId, paramsList)
if err != nil {
return nil, err
}
return postList.ToSlice(), nil
}
func (api *PluginAPI) AddChannelMember(channelId, userId string) (*model.ChannelMember, *model.AppError) {
// For now, don't allow overriding these via the plugin API.
userRequestorId := ""