mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
refactor: adapter
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
|
import { MsfChangeReasonType, MsfStatusType } from "../entities/adapter";
|
||||||
|
|
||||||
export class NodeIDependsAdapter {
|
export class NodeIDependsAdapter {
|
||||||
onMSFStatusChange(arg1: number, arg2: number) {
|
onMSFStatusChange(statusType: MsfStatusType, changeReasonType: MsfChangeReasonType) {
|
||||||
// console.log(arg1, arg2);
|
|
||||||
// if (arg1 == 2 && arg2 == 2) {
|
|
||||||
// log("NapCat丢失网络连接,请检查网络")
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMSFSsoError(args: unknown) {
|
onMSFSsoError(args: unknown) {
|
||||||
|
11
src/core/entities/adapter.ts
Normal file
11
src/core/entities/adapter.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
export enum MsfStatusType {
|
||||||
|
KUNKNOWN,
|
||||||
|
KDISCONNECTED,
|
||||||
|
KCONNECTED
|
||||||
|
}
|
||||||
|
export enum MsfChangeReasonType {
|
||||||
|
KUNKNOWN,
|
||||||
|
KUSERLOGININ,
|
||||||
|
KUSERLOGINOUT,
|
||||||
|
KAUTO
|
||||||
|
}
|
@@ -229,7 +229,7 @@ export async function NCoreInitShell() {
|
|||||||
sessionConfig,
|
sessionConfig,
|
||||||
new NodeIDependsAdapter(),
|
new NodeIDependsAdapter(),
|
||||||
new NodeIDispatcherAdapter(),
|
new NodeIDispatcherAdapter(),
|
||||||
sessionListener as any,
|
sessionListener,
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
session.startNT(0);
|
session.startNT(0);
|
||||||
|
Reference in New Issue
Block a user