Comments (1)
当存在其他通信方式时,假设此动作允许在其他动作下调用,应该返回什么事件?
在上一条的前提下,在其他通信方式对一个事件已进行过处理后,例如消息事件已通过调用回复消息动作进行回复,这时如果调用此动作时,是否应该返回被回复的事件?
如果以不同通信方式是相互隔离的假设为前提,这里就是其他通信方式的接收与否、回复与否,都不影响 get_latest_events
,我觉得这里可以理解为,这种通信方式不会和其他的通信方式同时使用(比如正向 WS 和反向 WS 也会重复收事件),所以不会有重复收事件的问题,如果用户同时用了这些通信方式,那是 ta 代码写的有问题。
如果这个假设如果能够获得一致的认可的话,可以加到标准里,防止实现出现不一样的行为。
当在 HTTP 通信方式下调用时,获取返回的事件理论上应该从队列或缓存等数据结构中删除,此时如果事件队列或缓存为空,
timeout
字段如果不为 0 的时候,是在收到新的事件后立刻返回包含一个事件的结果,还是直到timeout
的值,返回这阶段内收到的所有事件?
收到立刻返回,因为 timeout
是“等待有事件来”的 timeout,不是“等待拿满 limit
个事件”的 timeout。
from onebot.
Related Issues (20)
- ban_group_member 新增 until_time 字段
- 分片上传文件 sha256 请求字段移至结束阶段
- 支持使用 URL query 参数传递鉴权 token HOT 3
- 明确事件 `time` 字段表述 HOT 1
- 移除单级群组接口中的 kick、ban、admin 相关接口
- 两级群组接口中为频道增加成员增减相关接口
- 修改 OneBotRPC 名称为 OneBot Connect
- 重命名用户类的 `nickname` 字段为 `user_name`,并新增 `user_displayname`、`user_remark`
- 多机器人账号连接复用 HOT 4
- OneBot Connect Webhook 和反向 WS 在不可控制 Header 的实现端处理方式
- 新增 `status_update` 元事件
- 移除事件的 `impl` 字段
- 反向 WebSocket 支持使用 `Sec-WebSocket-Protocol` 头传递 `X-OneBot-Version` 和 `X-Impl`
- 动作请求 `echo` 字段名改为 `id` HOT 1
- `<impl>` 允许使用短横线并采用点号分割不同部分
- `get_version` 动作响应数据移除 `platform`
- 明确动作请求 `self` 字段要求
- `upload_file_fragmented` 分片上传文件接口传输阶段移除 `size` 参数
- 关于在写onebot12协议java-sdk的一些想法
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 onebot.