aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Database.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/Database.go b/Database.go
index 9ebf000..cdf23e7 100644
--- a/Database.go
+++ b/Database.go
@@ -390,6 +390,13 @@ func GetObjectFromDB(db *sql.DB, actor Actor) Collection {
post.Replies.TotalItems, post.Replies.TotalImgs = GetObjectRepliesDBCount(db, post)
+ var localPost ObjectBase
+ localPost.Replies, postCnt, imgCnt = GetObjectRepliesCache(db, post)
+
+ for _, e := range localPost.Replies.OrderedItems {
+ post.Replies.OrderedItems = append(post.Replies.OrderedItems, e)
+ }
+
post.Replies.TotalItems = post.Replies.TotalItems + postCnt
post.Replies.TotalImgs = post.Replies.TotalImgs + imgCnt