MM-18060: Include deleted posts in compliance export. (#12957)

Этот коммит содержится в:
catalintomai
2019-10-31 09:31:18 -07:00
коммит произвёл GitHub
родитель f3716caba9
Коммит 7c658a98f0
2 изменённых файлов: 3 добавлений и 1 удалений

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

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

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

@@ -213,6 +213,7 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.Mess
Posts.Id AS PostId, Posts.Id AS PostId,
Posts.CreateAt AS PostCreateAt, Posts.CreateAt AS PostCreateAt,
Posts.UpdateAt AS PostUpdateAt, Posts.UpdateAt AS PostUpdateAt,
Posts.DeleteAt AS PostDeleteAt,
Posts.Message AS PostMessage, Posts.Message AS PostMessage,
Posts.Type AS PostType, Posts.Type AS PostType,
Posts.OriginalId AS PostOriginalId, Posts.OriginalId AS PostOriginalId,
@@ -241,7 +242,7 @@ 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 OR Posts.EditAt > :StartTime) AND (Posts.CreateAt > :StartTime OR Posts.EditAt > :StartTime OR Posts.DeleteAt > :StartTime) AND
Posts.Type = '' Posts.Type = ''
ORDER BY PostUpdateAt ORDER BY PostUpdateAt
LIMIT :Limit` LIMIT :Limit`