This commit is contained in:
idranme 2024-09-09 17:06:33 +08:00
parent da0ebd3f80
commit 3de054600c
No known key found for this signature in database
GPG Key ID: 926F7B5B668E495F

View File

@ -10,8 +10,8 @@ export enum ReceiveCmdS {
RECENT_CONTACT = 'nodeIKernelRecentContactListener/onRecentContactListChangedVer2', RECENT_CONTACT = 'nodeIKernelRecentContactListener/onRecentContactListChangedVer2',
UPDATE_MSG = 'nodeIKernelMsgListener/onMsgInfoListUpdate', UPDATE_MSG = 'nodeIKernelMsgListener/onMsgInfoListUpdate',
UPDATE_ACTIVE_MSG = 'nodeIKernelMsgListener/onActiveMsgInfoUpdate', UPDATE_ACTIVE_MSG = 'nodeIKernelMsgListener/onActiveMsgInfoUpdate',
NEW_MSG = `nodeIKernelMsgListener/onRecvMsg`, NEW_MSG = 'nodeIKernelMsgListener/onRecvMsg',
NEW_ACTIVE_MSG = `nodeIKernelMsgListener/onRecvActiveMsg`, NEW_ACTIVE_MSG = 'nodeIKernelMsgListener/onRecvActiveMsg',
SELF_SEND_MSG = 'nodeIKernelMsgListener/onAddSendMsg', SELF_SEND_MSG = 'nodeIKernelMsgListener/onAddSendMsg',
USER_INFO = 'nodeIKernelProfileListener/onProfileSimpleChanged', USER_INFO = 'nodeIKernelProfileListener/onProfileSimpleChanged',
USER_DETAIL_INFO = 'nodeIKernelProfileListener/onProfileDetailInfoChanged', USER_DETAIL_INFO = 'nodeIKernelProfileListener/onProfileDetailInfoChanged',
@ -60,7 +60,7 @@ export function hookNTQQApiReceive(window: BrowserWindow, onlyLog: boolean) {
apply(target, thisArg, args: [channel: string, ...args: NTReturnData]) { apply(target, thisArg, args: [channel: string, ...args: NTReturnData]) {
try { try {
if (logHook && !args[1]?.eventName?.startsWith('ns-LoggerApi')) { if (logHook && !args[1]?.eventName?.startsWith('ns-LoggerApi')) {
log(`received ntqq api message: ${args[0]}`, args) log('received ntqq api message', args)
} }
} catch { } } catch { }
if (!onlyLog) { if (!onlyLog) {
@ -102,7 +102,7 @@ export function hookNTQQApiCall(window: BrowserWindow, onlyLog: boolean) {
if (!onlyLog) { if (!onlyLog) {
try { try {
const _args: unknown[] = args[3][1] const _args: unknown[] = args[3][1]
const cmdName: NTMethod = _args[0] as NTMethod const cmdName = _args[0] as NTMethod
const callParams = _args.slice(1) const callParams = _args.slice(1)
callHooks.forEach((hook) => { callHooks.forEach((hook) => {
if (hook.method.includes(cmdName)) { if (hook.method.includes(cmdName)) {