summaryrefslogtreecommitdiffstats
path: root/model/client.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-05-09 12:00:08 -0400
committerCorey Hulen <corey@hulen.com>2016-05-09 09:00:08 -0700
commit07126101d379b900724c7c5cfc82070b42c235d6 (patch)
tree80b2485b61eb1684cd6127473267af206c3ab1c2 /model/client.go
parent9e07f4b021b28a3e301359a48cf950298f3e552e (diff)
downloadchat-07126101d379b900724c7c5cfc82070b42c235d6.tar.gz
chat-07126101d379b900724c7c5cfc82070b42c235d6.tar.bz2
chat-07126101d379b900724c7c5cfc82070b42c235d6.zip
Recent mention searches now OR terms instead of AND (#2931)
Diffstat (limited to 'model/client.go')
-rw-r--r--model/client.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/model/client.go b/model/client.go
index f045401eb..1575df9e0 100644
--- a/model/client.go
+++ b/model/client.go
@@ -918,8 +918,11 @@ func (c *Client) DeletePost(channelId string, postId string) (*Result, *AppError
}
}
-func (c *Client) SearchPosts(terms string) (*Result, *AppError) {
- if r, err := c.DoApiGet(c.GetTeamRoute()+"/posts/search?terms="+url.QueryEscape(terms), "", ""); err != nil {
+func (c *Client) SearchPosts(terms string, isOrSearch bool) (*Result, *AppError) {
+ data := map[string]interface{}{}
+ data["terms"] = terms
+ data["is_or_search"] = isOrSearch
+ if r, err := c.DoApiPost(c.GetTeamRoute()+"/posts/search", StringInterfaceToJson(data)); err != nil {
return nil, err
} else {
return &Result{r.Header.Get(HEADER_REQUEST_ID),