[MM-42191]: Include deleted posts (#19985)

* MM-42191: Include deleted posts: Add includeDeleted query parameter for getPostsForChannel

* MM-42191: Fix error typo for includeDeleted query parameter

* MM-42191: Include deleted posts: Set permission error when deleted posts are requested by non system admins

* MM-42191: Include deleted posts: Refactor replyCountSubQuery and conditions when includeDeleted is not presented, refactor getRootPosts

* MM-42191: Include deleted posts: Refactor getRootPosts function along with skipFetchThreads and includeDeleted

* MM-42191: Include deleted posts: Rename includeDeleted to include_deleted param

* MM-42191: Include deleted posts: Fix failed posts unit tests

* MM-42191: Include deleted posts: Add missing include deleted option in multiple queries

* MM-42191: Include deleted posts: Add tests for include deleted option in TestGetPostsForChannel, TestGetPostsBefore, TestGetPostsAfter

* MM-42191: include deleted posts: Add tests cases for post store test

* MM-42191: Include deleted posts: Add extra unit test to ensure not returning deleted posts when IncludeDelete is false

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Orlando Romo
2022-09-27 13:00:42 -05:00
коммит произвёл GitHub
родитель 1d8bb0605c
Коммит b9834a2fc2
9 изменённых файлов: 269 добавлений и 77 удалений

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

@@ -304,6 +304,7 @@ type GetPostsOptions struct {
FromPost string // PostId after which to send the items
FromCreateAt int64 // CreateAt after which to send the items
Direction string // Only accepts up|down. Indicates the order in which to send the items.
IncludeDeleted bool
}
type PostCountOptions struct {