nonebot / adapter-satori

NoneBot2 Satori 适配器 / Satori Protocol adapter for nonebot2
MIT License
85 stars 5 forks source link

[Bug] 发送本地绝对路径格式的图片无返回值 #7

Closed contr4l closed 9 months ago

contr4l commented 10 months ago

请确认:

Bug

问题

发送图片接口中,将url指定为file:///格式的本地绝对路径,create_message无返回值

如何复现

后端为adapter-satori, 协议端为chronocat 0.52,仅本地路径形式的图片发送存在问题

预期行为

可以使用绝对路径发送,例如:{'type': 'img', 'data': {'src': 'file:///C:\Users\Public\gocqhttp\data\images\817815373\a75d121be086f93df202810d311b70df.gif'}}

使用环境:

日志/截图

12-13 16:59:48 [INFO] nonebot | Matcher(type='message', module=iCore.bot.interpreter, lineno=171) running complete {'type': 'img', 'data': {'src': 'file:///C:\Users\Public\gocqhttp\data\images\817815373\a75d121be086f93df202810d311b70df.gif'}} request is: Request(method='POST', url='http://localhost:5500/v1/message.create') content is 12-13 16:59:49 [WARNING] apscheduler | Execution of job "none_bot_work_queue (trigger: interval[0:00:01], next run at: 2023-12-13 16:59:49 CST)" skipped: maximum number of running instances reached (1) 12-13 16:59:50 [WARNING] apscheduler | Execution of job "none_bot_work_queue (trigger: interval[0:00:01], next run at: 2023-12-13 16:59:50 CST)" skipped: maximum number of running instances reached (1) 12-13 16:59:51 [INFO] nonebot | Event will be handled by Matcher(type='message', module=iCore.bot.interpreter, lineno=171) 12-13 16:59:51 [INFO] nonebot | Matcher(type='message', module=iCore.bot.interpreter, lineno=171) running complete res is [] image

contr4l commented 10 months ago

问题更新:尝试使用raw字段时,在create_message这一步,content变成空值。

RF-Tar-Railt commented 9 months ago

问题更新:尝试使用raw字段时,在create_message这一步,content变成空值。

这个应该是你没传对参数

RF-Tar-Railt commented 9 months ago

然后的话,发图失败应该是chronocat那边的问题

contr4l commented 9 months ago

问题更新:尝试使用raw字段时,在create_message这一步,content变成空值。

这个应该是你没传对参数

从添加的打印结果来看,base64的编码结果是对的,但问题我先关掉了,satori协议还是有诸多不太好用的地方。