Compare commits

...

2 commits

3 changed files with 11 additions and 5 deletions

View file

@ -109,10 +109,16 @@ class MMFCustomersGroupsServiceProvider extends ServiceProvider {
$emails = new Collection;
foreach ( $groups as $group_id ) {
$group = CustomersGroup::find($group_id);
$emails->concat($group->emails());
$emails = $emails->concat($group->emails());
}
$emails = $emails->unique();
// TODO: Update $conversation to include this list of e-mails.
$emails = $emails->unique('email')->pluck('email');
// Update the list of cc emails.
$cc = array_unique(array_merge(
$conversation->getCcArray(),
$emails->toArray()
));
$conversation->setCc($cc);
$conversation->save();
}, 20, 2);
}
}

View file

@ -1,7 +1,7 @@
{
"name": "millions-missing-france/freescout-customers-groups",
"description": "Freescout customers groups - Set groups of Freescout Customers for easier group emailing",
"version": "0.0.0",
"version": "0.1.0",
"type": "library",
"license": ["AGPL-3.0-only"],
"authors": [

View file

@ -2,7 +2,7 @@
"name": "MMFCustomersGroups",
"alias": "mmfcustomersgroups",
"description": "Freescout customers groups - Set groups of Freescout Customers for easier group emailing",
"version": "0.0.0",
"version": "0.1.0",
"detailsUrl": "",
"author": "Millions Missing FRANCE",
"authorUrl": "info@millionsmissing.fr",