feat: 群头像设置

This commit is contained in:
手瓜一十雪
2024-07-24 11:37:12 +08:00
parent 094ff25fb6
commit 77aa706287
5 changed files with 67 additions and 1 deletions

View File

@@ -7,6 +7,9 @@ import { logDebug } from '@/common/utils/log';
// console.log(JSON.stringify(await NTQQGroupApi.getMemberExtInfo(), null, 2));
// }, 20000);
export class NTQQGroupApi {
static async setGroupAvatar(gc:string,filePath: string) {
return napCatCore.session.getGroupService().setHeader(gc,filePath);
}
static async getGroups(forced = false) {
let [_retData, _updateType, groupList] = await NTEventDispatch.CallNormalEvent
<(force: boolean) => Promise<any>, (updateType: number, groupList: Group[]) => void>

View File

@@ -46,6 +46,10 @@ export class NTQQUserApi {
const ret = await napCatCore.session.getProfileService().setHeader(filePath) as setQQAvatarRet;
return { result: ret?.result, errMsg: ret?.errMsg };
}
static async setGroupAvatar(gc:string,filePath: string) {
const ret = await napCatCore.session.getGroupService().setHeader(gc,filePath);
return { result: ret?.result, errMsg: ret?.errMsg };
}
static async getSelfInfo() {

View File

@@ -9,6 +9,7 @@ import {
import { GeneralCallResult } from '@/core/services/common';
export interface NodeIKernelGroupService {
setHeader(uid:string,path:string): unknown;
addKernelGroupListener(listener: NodeIKernelGroupListener): number;