MM-56579: Include deactivated users from DM posts (#25985)
There were 2 separate bugs here: 1. We were not including deactivated users while fetching posts from DM channels. 2. We were not respecting the includeArchivedChannels flag while fetching DM channels. We fix both of these issues here. ```release-note Include posts from deactivated users in DM channel export. Also respect the --include-archived-channels flag for DM channels. ``` https://mattermost.atlassian.net/browse/MM-56579 Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
62f616dfbf
Коммит
28cb8d0441
@@ -141,25 +141,25 @@ func (_m *PostStore) Get(ctx context.Context, id string, opts model.GetPostsOpti
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterID
|
||||
func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error) {
|
||||
ret := _m.Called(limit, afterID)
|
||||
// GetDirectPostParentsForExportAfter provides a mock function with given fields: limit, afterID, includeArchivedChannels
|
||||
func (_m *PostStore) GetDirectPostParentsForExportAfter(limit int, afterID string, includeArchivedChannels bool) ([]*model.DirectPostForExport, error) {
|
||||
ret := _m.Called(limit, afterID, includeArchivedChannels)
|
||||
|
||||
var r0 []*model.DirectPostForExport
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(int, string) ([]*model.DirectPostForExport, error)); ok {
|
||||
return rf(limit, afterID)
|
||||
if rf, ok := ret.Get(0).(func(int, string, bool) ([]*model.DirectPostForExport, error)); ok {
|
||||
return rf(limit, afterID, includeArchivedChannels)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(int, string) []*model.DirectPostForExport); ok {
|
||||
r0 = rf(limit, afterID)
|
||||
if rf, ok := ret.Get(0).(func(int, string, bool) []*model.DirectPostForExport); ok {
|
||||
r0 = rf(limit, afterID, includeArchivedChannels)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.DirectPostForExport)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(int, string) error); ok {
|
||||
r1 = rf(limit, afterID)
|
||||
if rf, ok := ret.Get(1).(func(int, string, bool) error); ok {
|
||||
r1 = rf(limit, afterID, includeArchivedChannels)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user