From 46ade7640ad45c44a36fb085357019ce3ac9b0be Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 9 Dec 2019 11:36:39 -0500 Subject: [PATCH] feat(mail(js)): new button to expand recipients that are LDAP groups Copy all object attributes when cloning the Message object in the popup view. Fixes #4902 --- UI/WebServerResources/js/Mailer/Message.service.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/UI/WebServerResources/js/Mailer/Message.service.js b/UI/WebServerResources/js/Mailer/Message.service.js index 687b880ab..22704afdd 100644 --- a/UI/WebServerResources/js/Mailer/Message.service.js +++ b/UI/WebServerResources/js/Mailer/Message.service.js @@ -827,9 +827,10 @@ */ Message.prototype.$omit = function(options) { var message = {}, - privateAttributes = options && options.privateAttributes; - angular.forEach(this.editable, function(value, key) { - if (_.includes(['to', 'cc', 'bcc'], key)) { + privateAttributes = options && options.privateAttributes, + source = privateAttributes ? this : this.editable; + angular.forEach(source, function(value, key) { + if (_.includes(['to', 'cc', 'bcc'], key) && !privateAttributes) { message[key] = _.map(value, function (addr) { return addr.toString(); });