summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-12-07 14:56:46 -0500
committerJoramWilander <jwawilander@gmail.com>2015-12-07 14:56:46 -0500
commit1e34cf8ab00a56318290b3f18acd6334c971944f (patch)
tree539658f1936bd666cbb2b98185261b40c37d098c /store
parentb06f11fd632f146a204b4ef1357a8c099bade072 (diff)
downloadchat-1e34cf8ab00a56318290b3f18acd6334c971944f.tar.gz
chat-1e34cf8ab00a56318290b3f18acd6334c971944f.tar.bz2
chat-1e34cf8ab00a56318290b3f18acd6334c971944f.zip
Make sure posts in threads are included in getPosts DB query
Diffstat (limited to 'store')
-rw-r--r--store/sql_post_store.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 035309e21..be770c09e 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -571,7 +571,8 @@ func (s SqlPostStore) getParentsPosts(channelId string, offset int, limit int) S
AND DeleteAt = 0
ORDER BY CreateAt DESC
LIMIT :Limit OFFSET :Offset) q3
- WHERE q3.RootId != '') q1 ON q1.RootId = q2.Id
+ WHERE q3.RootId != '') q1
+ ON q1.RootId = q2.Id OR q1.RootId = q2.RootId
WHERE
ChannelId = :ChannelId2
AND DeleteAt = 0