mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
fix: QQ 官方 API 图片识别功能不正常 (#825)
This commit is contained in:
parent
7ed190e6d2
commit
4b2785c5eb
|
@ -198,7 +198,6 @@ class OfficialMessageConverter(adapter_model.MessageConverter):
|
|||
bot_account_id: int = 0,
|
||||
) -> mirai.MessageChain:
|
||||
yiri_msg_list = []
|
||||
|
||||
# 存id
|
||||
|
||||
yiri_msg_list.append(
|
||||
|
@ -218,7 +217,7 @@ class OfficialMessageConverter(adapter_model.MessageConverter):
|
|||
yiri_msg_list.append(mirai.At(target=mention.id))
|
||||
|
||||
for attachment in message.attachments:
|
||||
if attachment.content_type == "image":
|
||||
if attachment.content_type.startswith("image"):
|
||||
yiri_msg_list.append(mirai.Image(url=attachment.url))
|
||||
else:
|
||||
logging.warning(
|
||||
|
|
Loading…
Reference in New Issue
Block a user