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 удалений

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

@@ -21,6 +21,14 @@ func NewPostList() *PostList {
}
}
func (o *PostList) ToSlice() []*Post {
var posts []*Post
for _, id := range o.Order {
posts = append(posts, o.Posts[id])
}
return posts
}
func (o *PostList) WithRewrittenImageURLs(f func(string) string) *PostList {
copy := *o
copy.Posts = make(map[string]*Post)