987ac09896d2dee8f5053a92c19d318934d83b1e
get_group_msg_history was served only from the local observed-message store, so it could never return more than what SnowLuma saw live (the "only 100 messages" symptom). It now fetches real history from the server. - protocol: new SsoGetGroupMsg packet (trpc.msg.register_proxy.RegisterProxy .SsoGetGroupMsg, sequence-range fetch; fields per Lagrange). Each returned PushMsgBody is decoded by the existing group decoder via a factored-out buildContextFromMessage. - core: MessageApi.getGroupHistory walks backward in small sequence windows with rate-limiting + data-volume guards — a process-wide throttle (≥300ms between sends), 30-seq chunks, ≤12 requests, ≤200 messages per call — so a hammering client can't make us flood the server and get kicked. - onebot: get_group_msg_history resolves the anchor sequence (requested message_id or latest observed), fetches from the server, converts + returns, and persists each fetched message. Falls back to the local store on unknown anchor / empty / error. Persisting fetched history also fixes replying to pre-injection messages: the reply path resolves message_id→sequence via the store, which now contains the fetched messages. Tests: SsoGetGroupMsg request/response round-trip + decode reuse (protocol); walk-back chunking/dedup/cap/floor (core).
Next Remote Protocol Framework.
Releases · Issues · QQ 群 · Telegram
SnowLuma 是一个基于 TypeScript 的协议转换框架,旨在为 QQ 客户端提供 OneBot v11 标准接口,支持 WebSocket/HTTP 适配、多账号并行及 WebUI 管理。
特性
- OneBot v11 兼容:支持文本、音视频、Markdown、JSON 等消息格式。
- 高性能架构:TypeScript 全栈,基于 pnpm monorepo 管理,核心逻辑分离。
- 现代化管理:内置 WebUI 面板,支持实时日志、密码热更、多账号管理。
- 多适配器支持:WebSocket (Server/Client)、HTTP (Server/Post)。
- 数据持久化:使用 SQLite 存储好友、群组等关系数据。
快速开始
- 从 Releases 下载最新发布包并解压。
- 运行
./launcher.bat(Windows) 或./launcher.sh(Linux)。 - 访问
http://localhost:5099(初始账号admin,密码见控制台输出)。
鸣谢
参考了 LagrangeV2 的协议定义与 NapCatQQ 的实现思路。
Languages
TypeScript
98.9%
CSS
0.5%
JavaScript
0.5%