project-mirai / mirai-api-http

Mirai HTTP API (console) plugin
GNU Affero General Public License v3.0
1.65k stars 345 forks source link

升级到2.6.2版本,Http请求返回的内容不生效(Webhook模式) #649

Closed landall closed 1 year ago

landall commented 1 year ago

之前是Mirai Console 2.10 RC2 + mira api http 2.6.1强行运行(关掉了MCL自动升级),执行是正确的,webhook发来的请求,处理完返回json后,能够自动向发送信息的QQ回复消息。

升级到Mirai Console 2.13 + mirai api http 2.6.2后,所有原来执行正确的代码都失去作用了。没有看到Mirai Console报错,但是消息没法回复给发送方。

ryoii commented 1 year ago

参考配置文件,把 debug 模式打开,看看有没有 debug 报错内容输出。猜测是 core 升级后 ktor 依赖出现问题

noctmoon commented 1 year ago

参考配置文件,把 debug 模式打开,看看有没有 debug 报错内容输出。猜测是 core 升级后 ktor 依赖出现问题

在开启 single mode 并 关闭 verify 状态下,这个问题仍然存在,打开了debug模式,但是没有打印异常日志,mcl也没有消息响应。 core: 2.13.2 mah: 2.7.1 配置文件如下:

adapters:
  - http
  - webhook
debug: true
enableVerify: false
verifyKey: cyberpunk
singleMode: true
cacheSize: 4096
adapterSettings:
  http:
    host: localhost
    port: 12345
    cors: [*]
  webhook:
    destinations:
    - 'http://localhost/'
MR-XieXuan commented 1 year ago

确实没有生效,现在我使用的是主动http调用,不用 webhook 返回

landall commented 1 year ago

但主动调用会有两个问题, 一个是需要额外的身份认证,额外的网络端口。 另一个是在速度上有问题。 回复图片似乎原来的mirai-api-http就有问题,所以看不太出来。 但回复文字的速度差异非常明显。

------------------ 原始邮件 ------------------ 发件人: "project-mirai/mirai-api-http" @.>; 发送时间: 2022年12月22日(星期四) 下午3:06 @.>; @.**@.>; 主题: Re: [project-mirai/mirai-api-http] 升级到2.6.2版本,Http请求返回的内容不生效(Webhook模式) (Issue #649)

确实没有生效,现在我使用的是主动调用,不用 webhook 返回才正常

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

noctmoon commented 1 year ago

@landall 图片消息要经过tx服务器,速度跟你的服务器上行带宽有关

MR-XieXuan commented 1 year ago

现在好了吗?