refactor: inline getApiContext()

This commit is contained in:
Wesley F. Young
2024-08-11 19:10:42 +08:00
parent e88c0346f3
commit 89e777f99e
71 changed files with 173 additions and 167 deletions

View File

@@ -10,7 +10,7 @@ async function cloneMsg(coreContext: NapCatCore, msg: RawMessage): Promise<RawMe
peerUid: coreContext.selfInfo.uid,
};
const logger = coreContext.context.logger;
const NTQQMsgApi = coreContext.getApiContext().MsgApi;
const NTQQMsgApi = coreContext.apis.MsgApi;
//logDebug('克隆的目标消息', msg);
const sendElements: SendMessageElement[] = [];
@@ -31,7 +31,7 @@ async function cloneMsg(coreContext: NapCatCore, msg: RawMessage): Promise<RawMe
}
export async function handleForwardNode(coreContext: NapCatCore, destPeer: Peer, messageNodes: OB11MessageNode[]): Promise<RawMessage | null> {
const NTQQMsgApi = coreContext.getApiContext().MsgApi;
const NTQQMsgApi = coreContext.apis.MsgApi;
const selfPeer = {
chatType: ChatType.friend,
peerUid: coreContext.selfInfo.uid,