diff --git a/model/message_export.go b/model/message_export.go index 834c84e9eb..6011948dd3 100644 --- a/model/message_export.go +++ b/model/message_export.go @@ -21,6 +21,7 @@ type MessageExport struct { PostId *string PostCreateAt *int64 PostUpdateAt *int64 + PostDeleteAt *int64 PostMessage *string PostType *string PostRootId *string diff --git a/store/sqlstore/compliance_store.go b/store/sqlstore/compliance_store.go index 6dfcafca3f..35ff5f4039 100644 --- a/store/sqlstore/compliance_store.go +++ b/store/sqlstore/compliance_store.go @@ -213,6 +213,7 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) ([]*model.Mess Posts.Id AS PostId, Posts.CreateAt AS PostCreateAt, Posts.UpdateAt AS PostUpdateAt, + Posts.DeleteAt AS PostDeleteAt, Posts.Message AS PostMessage, Posts.Type AS PostType, 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 JOIN Bots ON Bots.UserId = Posts.UserId WHERE - (Posts.CreateAt > :StartTime OR Posts.EditAt > :StartTime) AND + (Posts.CreateAt > :StartTime OR Posts.EditAt > :StartTime OR Posts.DeleteAt > :StartTime) AND Posts.Type = '' ORDER BY PostUpdateAt LIMIT :Limit`