diff --git a/module/webhook/model.php b/module/webhook/model.php index 74a292e885..8999a62d6f 100644 --- a/module/webhook/model.php +++ b/module/webhook/model.php @@ -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); }