mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
샌더키값이 있을경우 친구톡 우선발송하도록 고침.
This commit is contained in:
parent
e982b22aa5
commit
5075e9d875
1 changed files with 10 additions and 3 deletions
|
|
@ -65,11 +65,19 @@ class CoolSMS extends Base implements \Rhymix\Framework\Drivers\SMSInterface
|
|||
{
|
||||
$sender = new \Nurigo\Api\Message($this->_config['api_key'], $this->_config['api_secret']);
|
||||
$status = true;
|
||||
|
||||
|
||||
foreach ($messages as $i => $message)
|
||||
{
|
||||
$options = new \stdClass;
|
||||
$options->type = $message->type;
|
||||
if ($this->_config['sender_key'])
|
||||
{
|
||||
$options->sender_key = $this->_config['sender_key'];
|
||||
$options->type = 'CTA';
|
||||
}
|
||||
else
|
||||
{
|
||||
$options->type = $message->type;
|
||||
}
|
||||
$options->from = $message->from;
|
||||
$options->to = implode(',', $message->to);
|
||||
$options->text = $message->content ?: $message->type;
|
||||
|
|
@ -91,7 +99,6 @@ class CoolSMS extends Base implements \Rhymix\Framework\Drivers\SMSInterface
|
|||
{
|
||||
$options->image = $message->image;
|
||||
}
|
||||
|
||||
$result = $sender->send($options);
|
||||
if (!$result->success_count)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue