summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/post.go b/app/post.go
index c40eab0e8..ee28fbbf7 100644
--- a/app/post.go
+++ b/app/post.go
@@ -532,6 +532,11 @@ func SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bo
}
}
+ // If the processed search params are empty, return empty search results.
+ if len(finalParamsList) == 0 {
+ return model.NewPostList(), nil
+ }
+
// We only allow the user to search in channels they are a member of.
userChannels, err := GetChannelsForUser(teamId, userId)
if err != nil {