MM-18522: Include edited posts in compliance export. (#12197)

* MM-18522: Export all post edits in compliance exports.

* MM-18522: Changes ordering of export query post results.
Этот коммит содержится в:
Martin Kraft
2019-09-13 18:18:06 -04:00
коммит произвёл GitHub
родитель 85ce27fc93
Коммит 890a7c6985
2 изменённых файлов: 4 добавлений и 2 удалений

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

@@ -20,6 +20,7 @@ type MessageExport struct {
PostId *string PostId *string
PostCreateAt *int64 PostCreateAt *int64
PostUpdateAt *int64
PostMessage *string PostMessage *string
PostType *string PostType *string
PostRootId *string PostRootId *string

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

@@ -212,6 +212,7 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.Mess
`SELECT `SELECT
Posts.Id AS PostId, Posts.Id AS PostId,
Posts.CreateAt AS PostCreateAt, Posts.CreateAt AS PostCreateAt,
Posts.UpdateAt AS PostUpdateAt,
Posts.Message AS PostMessage, Posts.Message AS PostMessage,
Posts.Type AS PostType, Posts.Type AS PostType,
Posts.OriginalId AS PostOriginalId, Posts.OriginalId AS PostOriginalId,
@@ -240,9 +241,9 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.Mess
LEFT OUTER JOIN Users ON Posts.UserId = Users.Id LEFT OUTER JOIN Users ON Posts.UserId = Users.Id
LEFT JOIN Bots ON Bots.UserId = Posts.UserId LEFT JOIN Bots ON Bots.UserId = Posts.UserId
WHERE WHERE
Posts.CreateAt > :StartTime AND (Posts.CreateAt > :StartTime OR Posts.EditAt > :StartTime) AND
Posts.Type = '' Posts.Type = ''
ORDER BY PostCreateAt ORDER BY PostUpdateAt
LIMIT :Limit` LIMIT :Limit`
var cposts []*model.MessageExport var cposts []*model.MessageExport