mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: Sync get_group_notice return structure to gocq
This commit is contained in:
parent
aa1f49d02f
commit
a013f750c7
@ -24,4 +24,4 @@ QQ Version: 3.2.7-23361 / 9.9.9-23361
|
|||||||
9. 支持表情回应api和上报 - 新增 Event/API
|
9. 支持表情回应api和上报 - 新增 Event/API
|
||||||
10. 支持获取Cookies 实现更加稳定 且支持Skey缓存3600S Pskey每次刷新 - 新增 API: /get_cookies
|
10. 支持获取Cookies 实现更加稳定 且支持Skey缓存3600S Pskey每次刷新 - 新增 API: /get_cookies
|
||||||
11. 支持 服务端踢下线 / 其它设备上线 / 重复登录 / 自身在线状态变更 日志 - 新增 Sys: Log
|
11. 支持 服务端踢下线 / 其它设备上线 / 重复登录 / 自身在线状态变更 日志 - 新增 Sys: Log
|
||||||
12. 支持了消息统计 - 新增 API: /get_status
|
12. 支持了消息统计 - API: /get_status
|
||||||
|
2
src/core
2
src/core
@ -1 +1 @@
|
|||||||
Subproject commit 22382f6d339f5d91fa9ed19225a13873122d9885
|
Subproject commit db31eb4f35170f09fd8af414fab459e18de706fe
|
@ -18,7 +18,7 @@ interface GroupNotice {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
type ApiGroupNotice = GroupNotice & WebApiGroupNoticeFeed;
|
type ApiGroupNotice = GroupNotice & WebApiGroupNoticeFeed;
|
||||||
export class GetGroupNotice extends BaseAction<PayloadType, ApiGroupNotice[]> {
|
export class GetGroupNotice extends BaseAction<PayloadType, GroupNotice[]> {
|
||||||
actionName = ActionName.GoCQHTTP_GetGroupNotice;
|
actionName = ActionName.GoCQHTTP_GetGroupNotice;
|
||||||
|
|
||||||
protected async _handle(payload: PayloadType) {
|
protected async _handle(payload: PayloadType) {
|
||||||
@ -27,20 +27,23 @@ export class GetGroupNotice extends BaseAction<PayloadType, ApiGroupNotice[]> {
|
|||||||
if (!ret) {
|
if (!ret) {
|
||||||
throw new Error('获取公告失败');
|
throw new Error('获取公告失败');
|
||||||
}
|
}
|
||||||
let retNotices: ApiGroupNotice[] = new Array<ApiGroupNotice>();
|
const retNotices: GroupNotice[] = new Array<ApiGroupNotice>();
|
||||||
for (let key in ret.feeds) {
|
for (const key in ret.feeds) {
|
||||||
let retNotice: ApiGroupNotice = {
|
const retApiNotice: WebApiGroupNoticeFeed = ret.feeds[key];
|
||||||
...ret.feeds[key],
|
const retNotice: GroupNotice = {
|
||||||
sender_id: ret.feeds[key].u,
|
// ...ret.feeds[key],
|
||||||
publish_time: ret.feeds[key].pubt,
|
sender_id: retApiNotice.u,
|
||||||
|
publish_time: retApiNotice.pubt,
|
||||||
message: {
|
message: {
|
||||||
text: ret.feeds[key].msg.text,
|
text: retApiNotice.msg.text,
|
||||||
image: []
|
image: retApiNotice.msg.pics?.map((pic) => {
|
||||||
|
return { id: pic.id, height: pic.h, width: pic.w };
|
||||||
|
}) || []
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
retNotices.push(retNotice);
|
retNotices.push(retNotice);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retNotices;
|
return retNotices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user