fix(protocol): get_group_file_system_info returns real counts + space (#196)
file_count 恒为 0(且 used_space/limit_count/total_space 是占位/写死值)。根因: 0x6D8 view 命令分三个 subcommand(1=List, 2=Count, 3=Space),但 getCount 错发到 **subCommand 3(Space)** 且 busId=0,并从 pb<1>/pb<2> 读计数——服务端根本没返回 Count 块,于是恒 0。 真机 RE(bot 在测试群传/删文件核对): - Count 走 **0x6D8_2 + busId=6**,响应 Count 块里 fileCount=**field 4**、maxCount(文件 数上限,如 1500)=**field 6**(旧 pb<1>/pb<2> 全落空)。 - Space 走 **0x6D8_3**,响应 Space 块 totalSpace=**field 4**、usedSpace=**field 5**(64 位)。 - 实测:fileCount=4、limitCount=1500、usedSpace=20103729、totalSpace=10737418240。 修复:改 GetGroupFileCount 到 subCommand 2 + busId 6 + 正确 tag;新增 GetGroupFileSpace (0x6D8_3);action 并发查两者,四个字段全返回**服务端实际值**(优于 NapCat 的写死占位)。 含 count/space 编解码回归测试。catalog regen。 typecheck 12 包;protocol 591 / onebot 521 / core 472 全绿。
This commit is contained in:
9 files changed
+146
-32
No files matched your search
@@ -213,14 +213,30 @@ export interface OidbGroupFileCountReq {
|
||||
appId?: pb<2, uint_32>;
|
||||
busId?: pb<3, uint_32>;
|
||||
}
|
||||
// Count response (0x6D8_2): fileCount is field 4 and maxCount (the group's file
|
||||
// ceiling, e.g. 1500) field 6 — RE'd from a live count query (#196). The old
|
||||
// pb<1>/pb<2> tags matched nothing, so file_count always decoded to 0.
|
||||
export interface OidbGroupFileCountResp {
|
||||
fileCount?: pb<1, uint_32>;
|
||||
maxCount?: pb<2, uint_32>;
|
||||
isEnd?: pb<3, bool>;
|
||||
fileCount?: pb<4, uint_32>;
|
||||
maxCount?: pb<6, uint_32>;
|
||||
isFull?: pb<7, bool>;
|
||||
}
|
||||
// Space request/response (0x6D8_3). Both values are 64-bit — the 10 GiB ceiling
|
||||
// already exceeds uint32.
|
||||
export interface OidbGroupFileSpaceReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
appId?: pb<2, uint_32>;
|
||||
}
|
||||
export interface OidbGroupFileSpaceResp {
|
||||
totalSpace?: pb<4, uint_64>;
|
||||
usedSpace?: pb<5, uint_64>;
|
||||
}
|
||||
// count → subCommand 2, space → subCommand 3 (List is subCommand 1).
|
||||
export interface OidbGroupFileCountViewReq {
|
||||
count?: pb<3, OidbGroupFileCountReq>;
|
||||
space?: pb<4, OidbGroupFileSpaceReq>;
|
||||
}
|
||||
export interface OidbGroupFileCountViewResp {
|
||||
count?: pb<3, OidbGroupFileCountResp>;
|
||||
space?: pb<4, OidbGroupFileSpaceResp>;
|
||||
}
|
||||
Reference in new issue
Block a user