MM-30304 - Handle collapsed threads in page apis (#17064)

Этот коммит содержится в:
Eli Yukelzon
2021-03-05 09:46:36 +02:00
коммит произвёл GitHub
родитель f2e27a39da
Коммит 4aa6c863c3
11 изменённых файлов: 110 добавлений и 103 удалений

Просмотреть файл

@@ -210,7 +210,7 @@ func getPostsForChannel(c *Context, w http.ResponseWriter, r *http.Request) {
w.Header().Set(model.HEADER_ETAG_SERVER, etag)
}
c.App.AddCursorIdsForPostList(list, afterPost, beforePost, since, page, perPage)
c.App.AddCursorIdsForPostList(list, afterPost, beforePost, since, page, perPage, collapsedThreads)
clientPostList := c.App.PreparePostListForClient(list)
w.Write([]byte(clientPostList.ToJson()))
@@ -264,8 +264,8 @@ func getPostsForChannelAroundLastUnread(c *Context, w http.ResponseWriter, r *ht
}
}
postList.NextPostId = c.App.GetNextPostIdFromPostList(postList)
postList.PrevPostId = c.App.GetPrevPostIdFromPostList(postList)
postList.NextPostId = c.App.GetNextPostIdFromPostList(postList, collapsedThreads)
postList.PrevPostId = c.App.GetPrevPostIdFromPostList(postList, collapsedThreads)
clientPostList := c.App.PreparePostListForClient(postList)