* Fix feishu webhook missing msg_type when no secret.
This commit is contained in:
@@ -453,7 +453,7 @@ class webhookModel extends model
|
||||
{
|
||||
$data = $this->getWeixinData($title, $text, $mobile);
|
||||
}
|
||||
elseif($webhook->type == 'feishuuser')
|
||||
elseif($webhook->type == 'feishuuser' or $webhook->type == 'feishugroup')
|
||||
{
|
||||
$data = $this->getFeishuData($title, $text);
|
||||
}
|
||||
@@ -705,11 +705,9 @@ class webhookModel extends model
|
||||
$sign = $timestamp . "\n" . $webhook->secret;
|
||||
$sign = base64_encode(hash_hmac('sha256', '', $sign, true));
|
||||
|
||||
$content = array();
|
||||
$content['timestamp'] = $timestamp;
|
||||
$content['sign'] = $sign;
|
||||
$content['msg_type'] = 'text';
|
||||
$content['content'] = json_decode($sendData);
|
||||
$content = json_decode($sendData);
|
||||
$content->timestamp = $timestamp;
|
||||
$content->sign = $sign;
|
||||
$sendData = json_encode($content);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user