From a32152211e6990d913349a1d9c8cdc6a2950198d Mon Sep 17 00:00:00 2001 From: Miu <30835281+DreamMiu@users.noreply.github.com> Date: Mon, 4 Mar 2024 01:34:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E5=88=A0=E9=99=A4=E9=9D=9EOneBot=2012?= =?UTF-8?q?=20=E6=A0=87=E5=87=86=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除非必须字段 time --- src/OneBot/V12/Validator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OneBot/V12/Validator.php b/src/OneBot/V12/Validator.php index 050500c..6a929f7 100644 --- a/src/OneBot/V12/Validator.php +++ b/src/OneBot/V12/Validator.php @@ -112,8 +112,8 @@ public static function validateHttpUrl(string $url): void public static function validateEventParams(array $data) { // 每个 OneBot 事件必须有这几个参数 - if (!isset($data['type'], $data['id'], $data['detail_type'], $data['time'], $data['sub_type'])) { - throw new OneBotException('onebot 12 requires type, id, detail_type, time, sub_type'); + if (!isset($data['type'], $data['id'], $data['detail_type'], $data['sub_type'])) { + throw new OneBotException('onebot 12 requires type, id, detail_type, sub_type'); } // 除元事件(type = meta)外,其他事件必须拥有 self 字段 if ($data['type'] !== 'meta' && !isset($data['self'])) { From 4f8b418ef6d011c3bc2d68159fb6915503da7146 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Mon, 4 Mar 2024 10:34:26 +0800 Subject: [PATCH 2/2] Bump version to 0.6.8 --- src/OneBot/global_defines.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OneBot/global_defines.php b/src/OneBot/global_defines.php index 92ef318..c6a3ce9 100644 --- a/src/OneBot/global_defines.php +++ b/src/OneBot/global_defines.php @@ -13,7 +13,7 @@ use ZM\Logger\ConsoleLogger; const ONEBOT_VERSION = '12'; -const ONEBOT_LIBOB_VERSION = '0.6.7'; +const ONEBOT_LIBOB_VERSION = '0.6.8'; const ONEBOT_JSON = 1; const ONEBOT_MSGPACK = 2;