summaryrefslogtreecommitdiffstats
path: root/store/sqlstore/compliance_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sqlstore/compliance_store.go')
-rw-r--r--store/sqlstore/compliance_store.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/store/sqlstore/compliance_store.go b/store/sqlstore/compliance_store.go
index 03d92d5e1..c3c75581e 100644
--- a/store/sqlstore/compliance_store.go
+++ b/store/sqlstore/compliance_store.go
@@ -138,6 +138,7 @@ func (s SqlComplianceStore) ComplianceExport(job *model.Compliance) store.StoreC
Teams.DisplayName AS TeamDisplayName,
Channels.Name AS ChannelName,
Channels.DisplayName AS ChannelDisplayName,
+ Channels.Type AS ChannelType,
Users.Username AS UserUsername,
Users.Email AS UserEmail,
Users.Nickname AS UserNickname,
@@ -172,6 +173,7 @@ func (s SqlComplianceStore) ComplianceExport(job *model.Compliance) store.StoreC
'Direct Messages' AS TeamDisplayName,
Channels.Name AS ChannelName,
Channels.DisplayName AS ChannelDisplayName,
+ Channels.Type AS ChannelType,
Users.Username AS UserUsername,
Users.Email AS UserEmail,
Users.Nickname AS UserNickname,
@@ -223,7 +225,12 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) store.StoreCha
Posts.Type AS PostType,
Posts.FileIds AS PostFileIds,
Channels.Id AS ChannelId,
- Channels.DisplayName AS ChannelDisplayName,
+ CASE
+ WHEN Channels.Type = 'D' THEN 'Direct Message'
+ WHEN Channels.Type = 'G' THEN 'Group Message'
+ ELSE Channels.DisplayName
+ END AS ChannelDisplayName,
+ Channels.Type AS ChannelType,
Users.Id AS UserId,
Users.Email AS UserEmail,
Users.Username