diff --git a/routes/bot/eventMsg.ts b/routes/bot/eventMsg.ts index bf73486..c116863 100644 --- a/routes/bot/eventMsg.ts +++ b/routes/bot/eventMsg.ts @@ -34,6 +34,7 @@ const filterIllegalMsg = async ({ logger, larkService, larkBody, + app, }: Context.Data): Promise => { const { chatId, msgType, msgText } = larkBody // 没有chatId的消息不处理 @@ -41,7 +42,7 @@ const filterIllegalMsg = async ({ if (!chatId) return true // 非私聊和群聊中艾特机器人的消息不处理 - if (!(await getIsP2pOrGroupAtBot(larkBody))) { + if (!(await getIsP2pOrGroupAtBot(larkBody, app))) { return true } @@ -65,7 +66,7 @@ const filterIllegalMsg = async ({ } // 非表情包只在私聊或者群聊中艾特机器人时才回复 - else if (await getIsP2pOrGroupAtBot(body)) { + else if (await getIsP2pOrGroupAtBot(body, app)) { logger.info(`got a illegal message, chatId: ${chatId}`) const content = JSON.stringify({ text: "哇!这是什么东东?我只懂普通文本啦![可爱]",