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
pull/265/head
Francis Lachapelle 2019-12-09 11:36:39 -05:00
parent 2e46e89d58
commit 46ade7640a
1 changed files with 4 additions and 3 deletions

View File

@ -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();
});