From 6c267044f04fd70c60ead9f62513f4f45b87fe49 Mon Sep 17 00:00:00 2001
From: Misa Liu <misaliu@misaliu.top>
Date: Tue, 27 Feb 2024 19:33:00 +0800
Subject: [PATCH] fix: Use a specific IPC channel for cache related API

---
 src/ntqqapi/ntcall.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ntqqapi/ntcall.ts b/src/ntqqapi/ntcall.ts
index 3b5bc0a..4a6543c 100644
--- a/src/ntqqapi/ntcall.ts
+++ b/src/ntqqapi/ntcall.ts
@@ -702,6 +702,7 @@ export class NTQQApi {
 
     static async setCacheSilentScan(isSilent: boolean = true) {
         return await callNTQQApi({
+            channel: NTQQApiChannel.IPC_UP_3,
             methodName: NTQQApiMethod.CACHE_SET_SILENCE,
             args: [{
                 isSilent
@@ -728,6 +729,7 @@ export class NTQQApi {
             key: string,
             value: string
         }[]>({
+            channel: NTQQApiChannel.IPC_UP_3,
             className: NTQQApiClass.OS_API,
             methodName: NTQQApiMethod.CACHE_PATH_SESSION,
         });
@@ -736,6 +738,7 @@ export class NTQQApi {
     static getChatCacheList(type: 1 | 2, pageSize: number = 80, pageIndex: number = 0) {
         return new Promise<ChatCacheList>((res, rej) => {
             callNTQQApi<ChatCacheList>({
+                channel: NTQQApiChannel.IPC_UP_3,
                 methodName: NTQQApiMethod.CACHE_CHAT_GET,
                 args: [{
                     ChatType: type,
@@ -750,6 +753,7 @@ export class NTQQApi {
 
     static async clearChatCache(chats: ChatCacheListItemBasic[] = [], fileKeys: unknown[] = []) {
         return await callNTQQApi<GeneralCallResult>({
+            channel: NTQQApiChannel.IPC_UP_3,
             methodName: NTQQApiMethod.CACHE_CHAT_CLEAR,
             args: [{
                 chats,