rollback: use legacy event wrapper

This commit is contained in:
Wesley F. Young
2024-08-09 11:34:18 +08:00
parent b2b070bcee
commit 166678505d
2 changed files with 39 additions and 37 deletions

View File

@@ -7,6 +7,7 @@ import { proxiedListenerOf } from "@/common/utils/proxy-handler";
import { MsgListener, ProfileListener } from "./listeners";
import { sleep } from "@/common/utils/helper";
import { SelfInfo, LineDevice, SelfStatusInfo } from "./entities";
import {LegacyNTEventWrapper} from "@/common/framework/event-legacy";
export enum NapCatCoreWorkingEnv {
Unknown = 0,
@@ -26,7 +27,8 @@ export function loadQQWrapper(QQVersion: string): WrapperNodeApi {
export class NapCatCore {
readonly context: InstanceContext;
readonly eventChannel: NTEventChannel;
readonly eventWrapper: LegacyNTEventWrapper;
// readonly eventChannel: NTEventChannel;
// runtime info, not readonly
selfInfo: SelfInfo;
@@ -34,7 +36,7 @@ export class NapCatCore {
constructor(context: InstanceContext, selfInfo: SelfInfo) {
this.selfInfo = selfInfo;
this.context = context;
this.eventChannel = new NTEventChannel(context.wrapper, context.session);
this.eventWrapper = new LegacyNTEventWrapper(context.wrapper, context.session);
this.initNapCatCoreListeners().then().catch(console.error);
}