diff --git a/model/message_export.go b/model/message_export.go index 96b78b4b74..834c84e9eb 100644 --- a/model/message_export.go +++ b/model/message_export.go @@ -20,6 +20,7 @@ type MessageExport struct { PostId *string PostCreateAt *int64 + PostUpdateAt *int64 PostMessage *string PostType *string PostRootId *string diff --git a/store/sqlstore/compliance_store.go b/store/sqlstore/compliance_store.go index 3ae6ef5b47..6dfcafca3f 100644 --- a/store/sqlstore/compliance_store.go +++ b/store/sqlstore/compliance_store.go @@ -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