diff options
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -159,8 +159,6 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co DeleteTombstonePosts(&mergeCollection) sort.Sort(ObjectBaseSortDesc(mergeCollection.OrderedItems)) - - returnData.Boards = GetBoardCollection(db) offset := 8 @@ -173,7 +171,6 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co } } - for i, e := range returnData.Posts { var replies []ObjectBase for i := 0; i < 5; i++ { @@ -190,6 +187,8 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co orderedReplies = append(orderedReplies, replies[cur]) } } + + returnData.Posts[i].Replies.TotalItems = len(returnData.Posts[i].Replies.OrderedItems) returnData.Posts[i].Replies.OrderedItems = orderedReplies } |