[MM-42192] Include deleted posts in GetPost (#20358)

* Introduced include_deleted query param on get posts endpoint

* Update the correct func name in the comment.

Co-authored-by: santoniriccardo <santoni.riccardo@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Vishal
2022-06-06 13:29:42 +05:30
коммит произвёл GitHub
родитель 456299841a
Коммит 27fc14201f
16 изменённых файлов: 85 добавлений и 38 удалений

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

@@ -2449,7 +2449,7 @@ func (a *App) UpdateThreadFollowForUserFromChannelAdd(userID, teamID, threadID s
return model.NewAppError("UpdateThreadFollowForUserFromChannelAdd", "app.user.update_thread_follow_for_user.app_error", nil, err.Error(), http.StatusInternalServerError)
}
post, appErr := a.GetSinglePost(threadID)
post, appErr := a.GetSinglePost(threadID, false)
if appErr != nil {
return appErr
}
@@ -2495,7 +2495,7 @@ func (a *App) UpdateThreadFollowForUserFromChannelAdd(userID, teamID, threadID s
}
func (a *App) UpdateThreadReadForUserByPost(currentSessionId, userID, teamID, threadID, postID string) (*model.ThreadResponse, *model.AppError) {
post, err := a.GetSinglePost(postID)
post, err := a.GetSinglePost(postID, false)
if err != nil {
return nil, err
}
@@ -2528,7 +2528,7 @@ func (a *App) UpdateThreadReadForUser(currentSessionId, userID, teamID, threadID
return nil, model.NewAppError("UpdateThreadReadForUser", "app.user.update_thread_read_for_user.app_error", nil, nErr.Error(), http.StatusInternalServerError)
}
post, err := a.GetSinglePost(threadID)
post, err := a.GetSinglePost(threadID, false)
if err != nil {
return nil, err
}