mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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.
This commit is contained in:
@@ -20,6 +20,7 @@ type MessageExport struct {
|
||||
|
||||
PostId *string
|
||||
PostCreateAt *int64
|
||||
PostUpdateAt *int64
|
||||
PostMessage *string
|
||||
PostType *string
|
||||
PostRootId *string
|
||||
|
||||
@@ -212,6 +212,7 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.Mess
|
||||
`SELECT
|
||||
Posts.Id AS PostId,
|
||||
Posts.CreateAt AS PostCreateAt,
|
||||
Posts.UpdateAt AS PostUpdateAt,
|
||||
Posts.Message AS PostMessage,
|
||||
Posts.Type AS PostType,
|
||||
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 JOIN Bots ON Bots.UserId = Posts.UserId
|
||||
WHERE
|
||||
Posts.CreateAt > :StartTime AND
|
||||
(Posts.CreateAt > :StartTime OR Posts.EditAt > :StartTime) AND
|
||||
Posts.Type = ''
|
||||
ORDER BY PostCreateAt
|
||||
ORDER BY PostUpdateAt
|
||||
LIMIT :Limit`
|
||||
|
||||
var cposts []*model.MessageExport
|
||||
|
||||
Reference in New Issue
Block a user