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
@@ -5610,10 +5610,10 @@ func (s *TimerLayerPostStore) Get(ctx context.Context, id string, opts model.Get
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) GetDirectPostParentsForExportAfter(limit int, afterID string) ([]*model.DirectPostForExport, error) {
|
||||
func (s *TimerLayerPostStore) GetDirectPostParentsForExportAfter(limit int, afterID string, includeArchivedChannels bool) ([]*model.DirectPostForExport, error) {
|
||||
start := time.Now()
|
||||
|
||||
result, err := s.PostStore.GetDirectPostParentsForExportAfter(limit, afterID)
|
||||
result, err := s.PostStore.GetDirectPostParentsForExportAfter(limit, afterID, includeArchivedChannels)
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user