diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-06-22 11:15:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 11:15:19 +0200 |
commit | d9390244afe90ed318ac8c263c19328f16dc2562 (patch) | |
tree | 82e834f259655acec6842b7adc19dff436f8a33d /store/sqlstore/compliance_store.go | |
parent | 8526739066ccb00ccd24b74650a7d7b284442985 (diff) | |
download | chat-d9390244afe90ed318ac8c263c19328f16dc2562.tar.gz chat-d9390244afe90ed318ac8c263c19328f16dc2562.tar.bz2 chat-d9390244afe90ed318ac8c263c19328f16dc2562.zip |
MM-8810: Add CSV Compliance export (#8966)
* MM-8810: Add CSV Compliance export
* Only allowing to schedule actiances export throught the cli
* De-duplicating some code
* Fixes on texts
* Fixes on translations
Diffstat (limited to 'store/sqlstore/compliance_store.go')
-rw-r--r-- | store/sqlstore/compliance_store.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/store/sqlstore/compliance_store.go b/store/sqlstore/compliance_store.go index c3c75581e..52bdee693 100644 --- a/store/sqlstore/compliance_store.go +++ b/store/sqlstore/compliance_store.go @@ -223,13 +223,18 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) store.StoreCha Posts.CreateAt AS PostCreateAt, Posts.Message AS PostMessage, Posts.Type AS PostType, + Posts.OriginalId AS PostOriginalId, Posts.FileIds AS PostFileIds, + Teams.Id AS TeamId, + Teams.Name AS TeamName, + Teams.DisplayName AS TeamDisplayName, Channels.Id AS ChannelId, - CASE + CASE WHEN Channels.Type = 'D' THEN 'Direct Message' WHEN Channels.Type = 'G' THEN 'Group Message' ELSE Channels.DisplayName END AS ChannelDisplayName, + Channels.Name AS ChannelName, Channels.Type AS ChannelType, Users.Id AS UserId, Users.Email AS UserEmail, @@ -237,6 +242,7 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) store.StoreCha FROM Posts LEFT OUTER JOIN Channels ON Posts.ChannelId = Channels.Id + LEFT OUTER JOIN Teams ON Channels.TeamId = Teams.Id LEFT OUTER JOIN Users ON Posts.UserId = Users.Id WHERE Posts.CreateAt > :StartTime AND |