From cad2ae723c69474e9ab122ed44c6c005ccff0484 Mon Sep 17 00:00:00 2001 From: Seijo Cecilia Date: Sun, 25 Aug 2024 19:43:41 +0800 Subject: [PATCH] refactor: normalize method name --- src/onebot/action/msg/SendMsg/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/onebot/action/msg/SendMsg/index.ts b/src/onebot/action/msg/SendMsg/index.ts index 320476fa..48366c53 100644 --- a/src/onebot/action/msg/SendMsg/index.ts +++ b/src/onebot/action/msg/SendMsg/index.ts @@ -167,7 +167,7 @@ export class SendMsg extends BaseAction { ); if (getSpecialMsgNum(payload, OB11MessageDataType.node)) { - const returnMsg = await this.handleForwardNode(peer, messages as OB11MessageNode[]); + const returnMsg = await this.handleForwardedNodes(peer, messages as OB11MessageNode[]); if (returnMsg) { const msgShortId = MessageUnique.createMsg({ guildId: '', @@ -193,7 +193,7 @@ export class SendMsg extends BaseAction { return { message_id: returnMsg!.id! }; } - private async handleForwardNode(destPeer: Peer, messageNodes: OB11MessageNode[]): Promise { + private async handleForwardedNodes(destPeer: Peer, messageNodes: OB11MessageNode[]): Promise { const NTQQMsgApi = this.CoreContext.apis.MsgApi; const selfPeer = { chatType: ChatType.KCHATTYPEC2C, @@ -222,7 +222,7 @@ export class SendMsg extends BaseAction { logger.logError('子消息中包含非node消息 跳过不合法部分'); continue; } - const nodeMsg = await this.handleForwardNode(selfPeer, OB11Data.filter(e => e.type === OB11MessageDataType.node)); + const nodeMsg = await this.handleForwardedNodes(selfPeer, OB11Data.filter(e => e.type === OB11MessageDataType.node)); if (nodeMsg) { nodeMsgIds.push(nodeMsg.msgId); MessageUnique.createMsg(selfPeer, nodeMsg.msgId);