diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/post.go | 5 |
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 { |