summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r--store/sql_post_store.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 4ea28507b..f083a07c9 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -291,7 +291,7 @@ func (s SqlPostStore) GetPostsSince(channelId string, time int64) StoreChannel {
WHERE
(UpdateAt > :Time
AND ChannelId = :ChannelId)
- LIMIT 100)
+ LIMIT 1000)
UNION
(SELECT
*
@@ -307,7 +307,7 @@ func (s SqlPostStore) GetPostsSince(channelId string, time int64) StoreChannel {
WHERE
UpdateAt > :Time
AND ChannelId = :ChannelId
- LIMIT 100) temp_tab))
+ LIMIT 1000) temp_tab))
ORDER BY CreateAt DESC`,
map[string]interface{}{"ChannelId": channelId, "Time": time})
@@ -319,7 +319,9 @@ func (s SqlPostStore) GetPostsSince(channelId string, time int64) StoreChannel {
for _, p := range posts {
list.AddPost(p)
- list.AddOrder(p.Id)
+ if p.UpdateAt > time {
+ list.AddOrder(p.Id)
+ }
}
result.Data = list