Stapxs / Stapxs-QQ-Lite-2.0

一个兼容 OneBot 协议的非官方网页版 QQ 客户端、electron 客户端。
https://stapxs.github.io/Stapxs-QQ-Lite-2.0/
Apache License 2.0
414 stars 34 forks source link

[ 错误 ] Lagrange.Core 事件支持问题 #83

Open mole828 opened 3 months ago

mole828 commented 3 months ago

错误来源

Stapxs QQ Lite

描述错误

Lagrange.Core 的文件获取不正常,好像不支持 http_proxy 的获取方式。 也就无法使用 src/pages/Chat.vue 中的方法

const url = `https://pan.qun.qq.com/cgi-bin/group_file/get_file_list?gc=${this.chat.show.id}&bkn=${runtimeData.loginInfo.bkn}&start_index=0&cnt=30&filter_code=0&folder_id=%2F&show_onlinedoc_folder=0`
Connector.send(
    'http_proxy',
    { 'url': url },
    'getGroupFiles'
)

Lagrange.Core 中使用的是 https://github.com/eric2788/Lagrange.Core/blob/1da0d82fd4633d6d4f8e957f3ecb7c2dfe9d8bab/Lagrange.OneBot/Core/Operation/File/GroupFSOperations.cs#L30C13-L30C38 将代码修改为

Connector.send(
    'get_group_files_by_folder',
    { group_id: this.chat.show.id }, 
    'getGroupFiles'
)

便可以在websocket中获取信息,虽然接受后的信息还不能正确使用。

复现流程

No response

截图

No response

版本信息

No response

更多

顺带一提的 我不太清楚目前这一项目是否还会在未来进行向前的兼容 还是说提倡迅速适配新的方式

Stapxs commented 3 months ago

因为在 oicq 中文件下载没有专门的实现所以我调用了腾讯的 Web API 进行实现 在向拉格兰兼容的时候没有修改(趴

而且拉格兰无法实现获取 Web API token 的功能所以之前使用 Web API 的部分功能也暂时都没法做兼容(瘫

Stapxs commented 3 months ago

然后像这种扩展的方法各家的实现可能差异很大(趴 所以兼容速度没有其他在 Onebot11 规范里的方法快 XD

mole828 commented 3 months ago

这样感觉pathMap的方式有些不太够用, 要不还是在项目中使用interface和implement好了。 还能顺便用 class Lagrange_Core extends Onebot {...} (好像在挖大坑

Stapxs commented 3 months ago

确实可以考虑把所有 onebot 交互也抽成一个类方便重写 🤔