From 4d4b1ad26c4b1e6403df2568c6567dd280e54157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 19 Nov 2024 18:44:56 +0800 Subject: [PATCH] fix: #543 --- src/onebot/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 5b99d993..1fb7264b 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -565,7 +565,7 @@ export class NapCatOneBot11Adapter { this.context.logger.logError('constructMessage error: ', e); } } - + private isSelfMessage(ob11Msg: { stringMsg: OB11Message; arrayMsg: OB11Message; @@ -577,7 +577,7 @@ export class NapCatOneBot11Adapter { private createMsgMap(network: Array, ob11Msg: any, isSelfMsg: boolean, message: RawMessage): Map { const msgMap: Map = new Map(); network.filter(e => e.enable).forEach(e => { - if (isSelfMsg) { + if (isSelfMsg || message.chatType !== ChatType.KCHATTYPEGROUP) { ob11Msg.stringMsg.target_id = parseInt(message.peerUin); ob11Msg.arrayMsg.target_id = parseInt(message.peerUin); }