diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-12-07 14:56:46 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-12-07 14:56:46 -0500 |
commit | 1e34cf8ab00a56318290b3f18acd6334c971944f (patch) | |
tree | 539658f1936bd666cbb2b98185261b40c37d098c /store | |
parent | b06f11fd632f146a204b4ef1357a8c099bade072 (diff) | |
download | chat-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.go | 3 |
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 |