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,
GeneralCallResult,
Group,
GroupInfoSource,
GroupMember,
GroupMemberRole,
GroupRequestOperateTypes,
@@ -32,7 +33,11 @@ export class NTQQGroupApi {
}
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) {
return this.context.session.getGroupService().setHeader(gc, filePath);
}

View File

@@ -2,6 +2,7 @@ import { NodeIKernelGroupListener } from '@/core/listeners/NodeIKernelGroupListe
import {
GroupExt0xEF0InfoFilter,
GroupExtParam,
GroupInfoSource,
GroupMember,
GroupMemberRole,
GroupNotifyMsgType,
@@ -15,7 +16,7 @@ import { GeneralCallResult } from '@/core/services/common';
export interface NodeIKernelGroupService {
//getGroupExt0xEF0Info(this.$enableGroupCodes, this.$bannedGroupCodes, this.$filter, this.$forceFetch
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, any> }}>;
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, any> } }>;
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
quitGroupV2(param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
@@ -151,7 +152,7 @@ export interface NodeIKernelGroupService {
getGroupExtList(force: boolean): Promise<GeneralCallResult>;
getGroupDetailInfo(groupCode: string): unknown;
getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): unknown;
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req