diff options
-rw-r--r-- | program/js/app.js | 2 | ||||
-rw-r--r-- | program/steps/mail/autocomplete.inc | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js index a8e66e211..845a48000 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -4439,7 +4439,7 @@ function rcube_webmail() this.ksearch_destroy(); // insert all members of a group - if (typeof this.env.contacts[id] === 'object' && this.env.contacts[id].type == 'group') { + if (typeof this.env.contacts[id] === 'object' && this.env.contacts[id].type == 'group' && !this.env.contacts[id].email) { insert += this.env.contacts[id].name + this.env.recipients_delimiter; this.group2expand[this.env.contacts[id].id] = $.extend({ input: this.ksearch_input }, this.env.contacts[id]); this.http_request('mail/group-expand', {_source: this.env.contacts[id].source, _gid: this.env.contacts[id].id}, false); diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index c805cd009..30b8f2299 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -124,7 +124,13 @@ if (!empty($book_types) && strlen($search)) { if ($group_prop['email']) { $idx = 0; foreach ((array)$group_prop['email'] as $email) { - $contacts[] = array('name' => format_email_recipient($email, $group['name']), 'type' => 'group'); + $contacts[] = array( + 'name' => format_email_recipient($email, $group['name']), + 'email' => $email, + 'type' => 'group', + 'id' => $group['ID'], + 'source' => $id, + ); $sort_keys[] = sprintf('%s %03d', $group['name'] , $idx++); if (count($contacts) >= $MAXNUM) { |