summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-09-10 06:20:01 -0700
committerCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-09-10 15:20:01 +0200
commita8d116b381ec9c28c5da5c8ee39a3699f568130d (patch)
treedeac1ed66cbd21dd08f865e36feba230b433b2fd /app/post.go
parentbb605a6b91073714f6b9a59b86c25c1b46bd2ba9 (diff)
downloadchat-a8d116b381ec9c28c5da5c8ee39a3699f568130d.tar.gz
chat-a8d116b381ec9c28c5da5c8ee39a3699f568130d.tar.bz2
chat-a8d116b381ec9c28c5da5c8ee39a3699f568130d.zip
Speed up search results post selection. (#9380)
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/post.go b/app/post.go
index 30602b392..8cfc6d659 100644
--- a/app/post.go
+++ b/app/post.go
@@ -705,8 +705,10 @@ func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOr
return nil, presult.Err
} else {
for _, p := range presult.Data.([]*model.Post) {
- postList.AddPost(p)
- postList.AddOrder(p.Id)
+ if p.DeleteAt == 0 {
+ postList.AddPost(p)
+ postList.AddOrder(p.Id)
+ }
}
}
}