Commit 3df1499c authored by 周智鹏's avatar 周智鹏

markdown 消息发送RPC

parent 9ec6ab8f
......@@ -113,4 +113,21 @@ class MessageHandler
$this->messageService->send($receiverIds, $application, 0, 0, [], $content);
}
/**
* 发送markdown 文本消息
* @param $receiverIds
* @param $content
* @param $title
* @throws HttpResponseException
*/
public function sendMarkDownText($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);
}
}
......@@ -37,4 +37,16 @@ interface MessageServiceInterface
public function sendMail($userList, $subject, $body): bool;
/**
* 发送markdown文本消息
* @param array $receiveUserId
* @param $application
* @param int $templateId
* @param int $sendUserId
* @param array $replace
* @param string $content
* @param string $title
* @return bool
*/
public function SendMarkDownMessage(array $receiveUserId, $application, $templateId = 0, $sendUserId = 0, $replace = [], $content = '',$title = ''): bool;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment