diff options
author | Jonathan <jonfritz@gmail.com> | 2018-03-07 10:54:51 -0500 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2018-03-07 15:54:51 +0000 |
commit | d448a6bef30339a63b7c118b8b2deb44cdb79d8e (patch) | |
tree | 4158c94595bf37e1e1aaf41b8441b73bd480b1c0 /store/sqlstore/compliance_store.go | |
parent | 09713ff4eadd3d706df45cb69f096b66c5b283fd (diff) | |
download | chat-d448a6bef30339a63b7c118b8b2deb44cdb79d8e.tar.gz chat-d448a6bef30339a63b7c118b8b2deb44cdb79d8e.tar.bz2 chat-d448a6bef30339a63b7c118b8b2deb44cdb79d8e.zip |
XYZ-87: GlobalRelay DM Exports do not Include Channel Name (#8275)
* Adding ChannelMemberHistory table records when DM channels are created. This ensures that both participants in a DM are shown in compliance export, even if only one of them typed anything
* Direct/Group Message channels now get pretty display names for the purpose of compliance exports
* Fixed string formatting in t.Fatal calls
* Changed uses of ChannelMemberHistory over to ChannelMemberHistoryResult in tests. This should have been done as a part of the work in XYZ-110, but seems to have been missed in this branch for some reason
Diffstat (limited to 'store/sqlstore/compliance_store.go')
-rw-r--r-- | store/sqlstore/compliance_store.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/store/sqlstore/compliance_store.go b/store/sqlstore/compliance_store.go index 03d92d5e1..121d80102 100644 --- a/store/sqlstore/compliance_store.go +++ b/store/sqlstore/compliance_store.go @@ -223,7 +223,11 @@ 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, Users.Id AS UserId, Users.Email AS UserEmail, Users.Username |