summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-06-22 11:15:19 +0200
committerGitHub <noreply@github.com>2018-06-22 11:15:19 +0200
commitd9390244afe90ed318ac8c263c19328f16dc2562 (patch)
tree82e834f259655acec6842b7adc19dff436f8a33d /store
parent8526739066ccb00ccd24b74650a7d7b284442985 (diff)
downloadchat-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')
-rw-r--r--store/sqlstore/compliance_store.go8
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