summaryrefslogtreecommitdiffstats
path: root/api4/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/post.go')
-rw-r--r--api4/post.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/api4/post.go b/api4/post.go
index b76e89964..12664cc24 100644
--- a/api4/post.go
+++ b/api4/post.go
@@ -330,6 +330,8 @@ func searchPosts(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
+ includeDeletedChannels := r.URL.Query().Get("include_deleted_channels") == "true"
+
props := model.StringInterfaceFromJson(r.Body)
terms, ok := props["terms"].(string)
if !ok || len(terms) == 0 {
@@ -341,7 +343,7 @@ func searchPosts(c *Context, w http.ResponseWriter, r *http.Request) {
startTime := time.Now()
- results, err := c.App.SearchPostsInTeam(terms, c.Session.UserId, c.Params.TeamId, isOrSearch)
+ results, err := c.App.SearchPostsInTeam(terms, c.Session.UserId, c.Params.TeamId, isOrSearch, includeDeletedChannels)
elapsedTime := float64(time.Since(startTime)) / float64(time.Second)
metrics := c.App.Metrics