Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
linyuchen committed Apr 29, 2024
2 parents ce3aef3 + ee70afd commit 51783f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
1. 修复图片URL,支持Win/Linux X64获取Rkey - 新增 Module: Moehoo
2. 重构了商城表情URL拼接 - 重构 API: /
3. 重构了Core日志与服务调用部分 - 重构 SYS: Log
4. 适配最新版Win 9.9.9 23159 提升了兼容性 - 修复 SYS: Listener Proxy
4. 适配最新版Windows 9.9.9-23159 / Linux 3.2.7-23361 提升了兼容性 - 修复 SYS: Listener Proxy
5. 修复群成员加入时间 上次活跃 活跃等级字段 - 影响 API: /get_group_member_info /get_group_member_list
6. 修复视频所需的 ffmpeg 路径不正确导致视频封面和时长获取失败 - 影响 Event/API
## 新增与调整
Expand Down
2 changes: 1 addition & 1 deletion src/core
Submodule core updated from 31b28b to 34f667
13 changes: 12 additions & 1 deletion src/onebot11/action/group/GetGroupMemberInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class GetGroupMemberInfo extends BaseAction<PayloadType, OB11GroupMember> {
actionName = ActionName.GetGroupMemberInfo;

protected async _handle(payload: PayloadType) {
let WebGroupMember = await WebApi.getGroupMembers(payload.group_id.toString());
const member = await getGroupMember(payload.group_id.toString(), payload.user_id.toString());
// log(member);
if (member) {
Expand All @@ -29,7 +30,17 @@ class GetGroupMemberInfo extends BaseAction<PayloadType, OB11GroupMember> {
} catch (e) {
logDebug('获取群成员详细信息失败, 只能返回基础信息', e);
}
return OB11Constructor.groupMember(payload.group_id.toString(), member);
let retMember = OB11Constructor.groupMember(payload.group_id.toString(), member);
for (let i = 0, len = WebGroupMember.length; i < len; i++) {
if (WebGroupMember[i]?.uin && WebGroupMember[i].uin === retMember.user_id) {
retMember.join_time = WebGroupMember[i]?.join_time;
retMember.last_sent_time = WebGroupMember[i]?.last_speak_time;
retMember.qage = WebGroupMember[i]?.qage;
retMember.level = WebGroupMember[i]?.lv.level;
}

}
return retMember;
} else {
throw (`群成员${payload.user_id}不存在`);
}
Expand Down

0 comments on commit 51783f1

Please sign in to comment.