feat: getGroupInfoEx

This commit is contained in:
手瓜一十雪
2024-08-28 17:05:00 +08:00
parent 179c4b800e
commit 2722ca2b0e
2 changed files with 11 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import {
ChatType, ChatType,
GeneralCallResult, GeneralCallResult,
Group, Group,
GroupInfoSource,
GroupMember, GroupMember,
GroupMemberRole, GroupMemberRole,
GroupRequestOperateTypes, GroupRequestOperateTypes,
@@ -32,7 +33,11 @@ export class NTQQGroupApi {
} }
this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`); this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`);
} }
async getGroupInfoEx(groupCode: string) {
const groupDetail = await this.context.session.getGroupService().getGroupDetailInfo(groupCode, GroupInfoSource.KDATACARD);
const groupExtInfo = await this.getGroupExtFE0Info([groupCode]);
return { groupDetail, groupExtInfo };
}
async setGroupAvatar(gc: string, filePath: string) { async setGroupAvatar(gc: string, filePath: string) {
return this.context.session.getGroupService().setHeader(gc, filePath); return this.context.session.getGroupService().setHeader(gc, filePath);
} }

View File

@@ -2,6 +2,7 @@ import { NodeIKernelGroupListener } from '@/core/listeners/NodeIKernelGroupListe
import { import {
GroupExt0xEF0InfoFilter, GroupExt0xEF0InfoFilter,
GroupExtParam, GroupExtParam,
GroupInfoSource,
GroupMember, GroupMember,
GroupMemberRole, GroupMemberRole,
GroupNotifyMsgType, GroupNotifyMsgType,
@@ -151,7 +152,7 @@ export interface NodeIKernelGroupService {
getGroupExtList(force: boolean): Promise<GeneralCallResult>; getGroupExtList(force: boolean): Promise<GeneralCallResult>;
getGroupDetailInfo(groupCode: string): unknown; getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): unknown;
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req