feat: 群头像设置

This commit is contained in:
手瓜一十雪 committed 2024-07-24 11:37:12 +08:00
1 parent 33082af9cc
commit 965c7f23b4
5 files changed
+67 -1

No files matched your search

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