koishi
koishi copied to clipboard
Bug: 异步消息的原子性及有序性
Describe the bug
事件触发bot.sendMessage
异步并发发送多条消息时,出现交叉及乱序的情况。
Steps to reproduce
例如在两个事件中向不支持图文混排的bot实现(如plugin-adapter-telegram
)发送测试<img src="https://koishi.chat/logo.png"/>消息
可能出现:
测试
测试
消息
*图片*
消息
*图片*
Expected behavior
同bot内异步消息应同样保持调用顺序且不应交叉。
Screenshots
No response
Versions
- OS: macOS 14.5
- Platform: Telegram
- Node version: 18.19.1
- Koishi version: 4.17.5
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M2
Binaries:
Node: 18.19.1
Yarn: 4.1.1
Koishi:
Core: 4.17.5
Console: 5.28.4
Additional context
No response