refactor: swap the naming of Impl and handler

This commit is contained in:
Wesley F. Young 2024-10-05 20:10:25 +08:00
parent e7cb70a5d8
commit 3ed8b4d915
2 changed files with 4 additions and 4 deletions

View File

@ -8,13 +8,13 @@ import {
OutgoingMessage,
} from '@laana-proto/def';
export class LaanaMessageActionHandler {
export class LaanaMessageActionImpl {
constructor(
public core: NapCatCore,
public laana: NapCatLaanaAdapter,
) {}
impl: LaanaActionHandler = {
handler: LaanaActionHandler = {
sendMessage: async (params) => {
return { msgId: await this.sendMessage(params.message!, params.targetPeer!) };
},

View File

@ -3,7 +3,7 @@ import { NapCatPathWrapper } from '@/common/path';
import { LaanaFileUtils } from './utils/file';
import { LaanaMessageUtils } from './utils/message';
import { LaanaActionHandler } from './action';
import { LaanaMessageActionHandler } from './action/message';
import { LaanaMessageActionImpl } from './action/message';
import { LaanaConfigLoader } from './config';
import { LaanaNetworkManager } from './network';
import { LaanaWsServerAdapter } from './network/ws-server';
@ -23,7 +23,7 @@ export class NapCatLaanaAdapter {
public pathWrapper: NapCatPathWrapper,
) {
this.actions = {
...new LaanaMessageActionHandler(this.core, this).impl,
...new LaanaMessageActionImpl(this.core, this).handler,
};
this.configLoader = new LaanaConfigLoader(this.core, this.pathWrapper.configPath);