From 1c31e8208aa9961b80e2d9f3761dd46337fd017b Mon Sep 17 00:00:00 2001 From: jaty <92199761+jatyPeng@users.noreply.github.com> Date: Sat, 29 Jul 2023 17:39:45 +0800 Subject: [PATCH] =?UTF-8?q?5.x=E6=94=AF=E6=8C=81=E8=A1=8C=E4=B8=9A?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=B6=88=E6=81=AF=20(#2729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/OfficialAccount/TemplateMessage/Client.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/OfficialAccount/TemplateMessage/Client.php b/src/OfficialAccount/TemplateMessage/Client.php index 475be1b32..deb6b8757 100644 --- a/src/OfficialAccount/TemplateMessage/Client.php +++ b/src/OfficialAccount/TemplateMessage/Client.php @@ -88,10 +88,14 @@ public function getIndustry() * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException * @throws \GuzzleHttp\Exception\GuzzleException */ - public function addTemplate($shortId) + public function addTemplate($shortId, $keywordList = []) { $params = ['template_id_short' => $shortId]; + if ($keywordList) { + $params['keyword_name_list'] = $keywordList; + } + return $this->httpPostJson('cgi-bin/template/api_add_template', $params); }