提交 72ec8e14 编写于 作者: K keacefull 提交者: 安正超

加入文本发送短信时为加签名自动读取默认签名 (#170)

加入文本发送短信时自动添加配置文件的签名
上级 a27b26cf
......@@ -50,6 +50,11 @@ class QcloudGateway extends Gateway
$signName = !empty($data['sign_name']) ? $data['sign_name'] : $config->get('sign_name', '');
unset($data['sign_name']);
$msg = $message->getContent($this);
if (!empty($msg) && mb_substr($msg, 0, 1) != '【' && !empty($signName)) {
$msg = '【' . $signName . '】' . $msg;
}
$type = !empty($data['type']) ? $data['type'] : 0;
$params = [
......@@ -58,7 +63,7 @@ class QcloudGateway extends Gateway
'mobile' => $to->getNumber(),
],
'type' => $type,
'msg' => $message->getContent($this),
'msg' => $msg,
'time' => time(),
'extend' => '',
'ext' => '',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册