新增设置头像的api,set_qq_avatar

This commit is contained in:
super1207
2024-03-15 20:45:22 +08:00
parent fccb0852aa
commit e348103e84
4 changed files with 59 additions and 0 deletions

View File

@@ -96,6 +96,8 @@ export enum NTQQApiMethod {
CACHE_CHAT_CLEAR = 'nodeIKernelStorageCleanService/clearChatCacheInfo',
OPEN_EXTRA_WINDOW = 'openExternalWindow',
SET_QQ_AVATAR = 'nodeIKernelProfileService/setHeader'
}
enum NTQQApiChannel {
@@ -894,4 +896,14 @@ export class NTQQApi {
}, null]
});
}
static async setQQAvatar(filePath: string) {
return await callNTQQApi<GeneralCallResult>({
methodName: NTQQApiMethod.SET_QQ_AVATAR,
args: [{
path:filePath
}, null],
timeoutSecond: 10 // 10秒不一定够
});
}
}