Comments (4)
你连 Koishi 用的 server-satori?
from koishi.
from koishi.
看 satori-server 和 satori core 看了一圈了,没看出来可以没 status 的情况,我不到了,也不到你是怎么连的,你也不说。。
不是,You block me, i block you...
from koishi.
看 satori-server 和 satori core 看了一圈了,没看出来可以没 status 的情况
这是协议连接过程出现的问题。
根据 Satori 文档, status 字段应该必需
根据文档, status
字段来自 Login
。
见文档 WebSocket 连接流程:
总的来说,Satori 应用需要在连接后遵循以下步骤:
- 连接建立后,在 10s 内发送一个 IDENTIFY 信令,用于鉴权和恢复会话;
SDK 收到后会回复一个 READY 信令,并开启事件推送;- 连接建立后,每隔 10s 向 SDK 发送一次 PING 信令;
SDK 收到后会回复一个 PONG 信令;- 应用持续接收来自 SDK 的 EVENT 信令,用于接收事件。
综上所述,READY
答复中缺失 status
的原因应该是:
- Chronocat 有 Token 鉴权,拥有登录流程,因此会下达 Login 事件
- Koishi 中 server-satori 可能没有进行鉴权,因此没有 Login 事件
可以尝试的操作:
在 server-satori 中配置 Token 后重新尝试。
建议:
- 鉴权目前来看不是必须的,因此
status
字段建议为可选 - 信令数据
body
是可选项,无须进行过多的检查
参见:
https://satori.js.org/zh-CN/resources/login.html#login
https://satori.js.org/zh-CN/protocol/events.html#%E8%BF%9E%E6%8E%A5%E6%B5%81%E7%A8%8B
由于这非 koishi 问题,先 Close 了。
from koishi.
Related Issues (20)
- Feature: 支持别名的过滤器
- 添加 SECURITY.md HOT 2
- Bug: yarn pub 无法填写otp HOT 3
- Bug: Schema相同的属性未正确合并 HOT 1
- Bug: 无法在局域网访问网页面板 HOT 3
- Bug: yarn pub 无法正常上传包 HOT 2
- Bug: 多余请求头导致拿不到头像 HOT 2
- Bug: 使用 windows 安装的 podman-desktop 启动镜像时老是尝试启动 /mnt/c/.../powershell.exe 但报错 ENOENT HOT 1
- Feature: Schema.string() 添加代码编辑器的 role
- Bug: Schema.array() 的`添加项目`按钮行为不正常,在特定场景不可用等
- Bug(Schema): Computed with Union Not Showing Branches Correctly HOT 2
- Bug: help 指令在遇到 .platform 或其他情况下回复错误
- Bug: 在使用指令管理 改变一些层级后,指令管理选项消失 HOT 2
- feat(core): parser[number]: support delimiters in number
- Bug: 使用adapter-satori的机器人会出现i18n错误 HOT 1
- adapter-qq是否能增加支持markdown模板和原生markdown?
- 云服务器如何公网连接控制台 HOT 2
- Bug(schemastery-vue): Schema.dict添加项目的体验优化 HOT 1
- Bug: Cannot find module '@cordisjs/server'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koishi.