Skip to content

Commit

Permalink
5.x支持行业模板消息 (#2729)
Browse files Browse the repository at this point in the history
  • Loading branch information
jatyPeng authored Jul 29, 2023
1 parent a09f7af commit 1c31e82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/OfficialAccount/TemplateMessage/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 1c31e82

Please sign in to comment.