Loading src/Handler/MessageHandler.php +17 −0 Original line number Original line Diff line number Diff line Loading @@ -131,4 +131,21 @@ class MessageHandler $this->messageService->SendMarkDownMessage($receiverIds, $application, 0, $sendUserId, [], $content, $title); $this->messageService->SendMarkDownMessage($receiverIds, $application, 0, $sendUserId, [], $content, $title); } } /** * 自动发送markdown 文本消息 * @param $receiverIds * @param $content * @param $title * @throws HttpResponseException */ public function sendAutoMarkDownText($receiverIds, $content, $title) { $application = $this->config->get('app_name'); if (!$application) { throw new HttpResponseException("请设置应用名app_name"); } $receiverIds = is_array($receiverIds) ? $receiverIds : [$receiverIds]; $this->messageService->SendMarkDownMessage($receiverIds, $application, 0, 0, [], $content, $title); } } } Loading
src/Handler/MessageHandler.php +17 −0 Original line number Original line Diff line number Diff line Loading @@ -131,4 +131,21 @@ class MessageHandler $this->messageService->SendMarkDownMessage($receiverIds, $application, 0, $sendUserId, [], $content, $title); $this->messageService->SendMarkDownMessage($receiverIds, $application, 0, $sendUserId, [], $content, $title); } } /** * 自动发送markdown 文本消息 * @param $receiverIds * @param $content * @param $title * @throws HttpResponseException */ public function sendAutoMarkDownText($receiverIds, $content, $title) { $application = $this->config->get('app_name'); if (!$application) { throw new HttpResponseException("请设置应用名app_name"); } $receiverIds = is_array($receiverIds) ? $receiverIds : [$receiverIds]; $this->messageService->SendMarkDownMessage($receiverIds, $application, 0, 0, [], $content, $title); } } }