From 26e207c1ea6843623efc4c6b572e029dd877e3d7 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 8 Dec 2025 17:56:10 +0800 Subject: [PATCH] =?UTF-8?q?chore(addon/aikefu):=20update=20=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=BC=9A=E8=AF=9DID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aikefu/event/KefuCreateConversation.php | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/src/addon/aikefu/event/KefuCreateConversation.php b/src/addon/aikefu/event/KefuCreateConversation.php index 0cd4b6a47..34b9027cd 100644 --- a/src/addon/aikefu/event/KefuCreateConversation.php +++ b/src/addon/aikefu/event/KefuCreateConversation.php @@ -37,45 +37,4 @@ class KefuCreateConversation ]; } } - - /** - * 处理智能客服获取历史消息事件 - * @param array $data 事件数据 - * @return array - */ - public function handleKefuGetHistory($data) - { - try { - // 创建addon的KefuApi实例 - $kefu_api = new KefuApi(); - - // 调用初始化方法设置属性 - $kefu_api->initializeForEvent($data); - - // 调用addon的getHistory方法 - $response = $kefu_api->getHistory(); - - // 返回响应数据 - return json_decode($response->getContent(), true); - } catch (\Exception $e) { - return [ - 'code' => -1, - 'message' => '获取历史消息失败:' . $e->getMessage(), - 'data' => [] - ]; - } - } - - /** - * 事件监听映射 - * @return array - */ - public function subscribe() - { - return [ - 'KefuChat' => 'handleKefuChat', - 'KefuCreateConversation' => 'handleKefuCreateConversation', - 'KefuGetHistory' => 'handleKefuGetHistory', - ]; - } }