Limit to 1000 recipients per request via CoolSMS

This commit is contained in:
Kijin Sung 2016-11-04 11:55:58 +09:00
parent c341a14a0a
commit 22cc4cf1c7

View file

@ -56,10 +56,9 @@ class CoolSMS extends Base implements \Rhymix\Framework\Drivers\SMSInterface
$recipients = $message->getRecipientsGroupedByCountry();
foreach ($recipients as $country => $country_recipients)
{
if (!$country)
{
$country_recipients = array(implode(',', $country_recipients));
}
$country_recipients = array_map(function($chunk) {
return implode(',', $chunk);
}, array_chunk($country_recipients, 1000));
foreach ($country_recipients as $recipient_number)
{