Loading src/Handler/MessageHandler.php +18 −1 Original line number Diff line number Diff line Loading @@ -47,4 +47,21 @@ class MessageHandler $this->messageService->send($receiverIds, $application, $templateId, $sendUserId, $replace); } /** * 发送文本消息 * @param $receiverIds * @param $content * @throws HttpResponseException */ public function sendText($receiverIds, $content) { $application = $this->config->get('app_name'); if (!$application) { throw new HttpResponseException("请设置应用名app_name"); } $receiverIds = is_array($receiverIds) ? $receiverIds : [$receiverIds]; $sendUserId = Auth::id(); $this->messageService->send($receiverIds, $application, 0, $sendUserId, [], $content); } } Loading
src/Handler/MessageHandler.php +18 −1 Original line number Diff line number Diff line Loading @@ -47,4 +47,21 @@ class MessageHandler $this->messageService->send($receiverIds, $application, $templateId, $sendUserId, $replace); } /** * 发送文本消息 * @param $receiverIds * @param $content * @throws HttpResponseException */ public function sendText($receiverIds, $content) { $application = $this->config->get('app_name'); if (!$application) { throw new HttpResponseException("请设置应用名app_name"); } $receiverIds = is_array($receiverIds) ? $receiverIds : [$receiverIds]; $sendUserId = Auth::id(); $this->messageService->send($receiverIds, $application, 0, $sendUserId, [], $content); } }