summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/api/post.go b/api/post.go
index 1d6cec5dd..c5bcd4f5a 100644
--- a/api/post.go
+++ b/api/post.go
@@ -820,16 +820,16 @@ func searchPosts(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- hashtagTerms, plainTerms := model.ParseHashtags(terms)
+ plainSearchParams, hashtagSearchParams := model.ParseSearchParams(terms)
var hchan store.StoreChannel
- if len(hashtagTerms) != 0 {
- hchan = Srv.Store.Post().Search(c.Session.TeamId, c.Session.UserId, hashtagTerms, true)
+ if hashtagSearchParams != nil {
+ hchan = Srv.Store.Post().Search(c.Session.TeamId, c.Session.UserId, hashtagSearchParams)
}
var pchan store.StoreChannel
- if len(plainTerms) != 0 {
- pchan = Srv.Store.Post().Search(c.Session.TeamId, c.Session.UserId, terms, false)
+ if plainSearchParams != nil {
+ pchan = Srv.Store.Post().Search(c.Session.TeamId, c.Session.UserId, plainSearchParams)
}
mainList := &model.PostList{}