From 566689c174c5149bdcf26df2222d4d02cfba61ef Mon Sep 17 00:00:00 2001 From: 1334431750 <1334431750@qq.com> Date: Fri, 22 Aug 2025 16:50:10 +0000 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=8F=91=E9=80=81=E5=9B=BE=E7=89=87=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/send_handler.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/send_handler.py b/src/send_handler.py index cf64a44..4687993 100644 --- a/src/send_handler.py +++ b/src/send_handler.py @@ -181,6 +181,9 @@ class SendHandler: elif seg.type == "file": file_path = seg.data new_payload = self.build_payload(payload, self.handle_file_message(file_path), False) + elif seg.type == "imageurl": + image_url = seg.data + new_payload = self.build_payload(payload, self.handle_imageurl_message(image_url), False) return new_payload def build_payload(self, payload: list, addon: dict, is_reply: bool = False) -> list: @@ -270,6 +273,13 @@ class SendHandler: "type": "file", "data": {"file": f"file://{file_path}"}, } + + def handle_imageurl_message(self, image_url: str) -> dict: + """处理图片链接消息""" + return { + "type": "image", + "data": {"file": image_url}, + } def handle_ban_command(self, args: Dict[str, Any], group_info: GroupInfo) -> Tuple[str, Dict[str, Any]]: """处理封禁命令 From 22eaced555f30e3593aec090710c8fe34a1eae15 Mon Sep 17 00:00:00 2001 From: 1334431750 <1334431750@qq.com> Date: Sun, 24 Aug 2025 07:14:29 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/recv_handler/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recv_handler/__init__.py b/src/recv_handler/__init__.py index 422041b..9b48285 100644 --- a/src/recv_handler/__init__.py +++ b/src/recv_handler/__init__.py @@ -84,4 +84,4 @@ class CommandType(Enum): return self.value -ACCEPT_FORMAT = ["text", "image", "emoji", "reply", "voice", "command", "voiceurl", "music", "videourl", "file"] +ACCEPT_FORMAT = ["text", "image", "emoji", "reply", "voice", "command", "voiceurl", "music", "videourl", "file","imageurl"]