mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
refactor: swap the naming of Impl
and handler
This commit is contained in:
parent
e7cb70a5d8
commit
3ed8b4d915
@ -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!) };
|
||||
},
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user