Update message.py

This commit is contained in:
FengLing11 2025-04-01 20:45:15 +08:00 committed by GitHub
parent 737a740968
commit f368c4df2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ class MessageUtils:
if isinstance(msg, str):
if msg.startswith("base64://"):
message_list.append(Image(raw=BytesIO(base64.b64decode(msg[9:]))))
elif msg.startswith("http://"):
elif msg.startswith(("http://","https://")):
message_list.append(Image(url=msg))
else:
message_list.append(Text(msg))