mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: report self message
This commit is contained in:
parent
c2646dabad
commit
7a5d7dd49e
@ -10,5 +10,6 @@
|
||||
"interval": 30000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"reportSelfMessage": false
|
||||
}
|
||||
|
@ -47,11 +47,13 @@ export class NapCatLaanaAdapter {
|
||||
|
||||
registerEvents() {
|
||||
this.core.eventChannel.on('message/receive', async (msg) => {
|
||||
const msgOrEmpty = await this.utils.msg.rawMessageToLaana(msg);
|
||||
if (!msgOrEmpty) {
|
||||
return;
|
||||
await this.networkManager.emitMessage(await this.utils.msg.rawMessageToLaana(msg));
|
||||
});
|
||||
|
||||
this.core.eventChannel.on('message/send', async (msg) => {
|
||||
if (this.configLoader.configData.reportSelfMessage) {
|
||||
await this.networkManager.emitMessage(await this.utils.msg.rawMessageToLaana(msg));
|
||||
}
|
||||
await this.networkManager.emitMessage(msgOrEmpty);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user