fix: 代码错误
This commit is contained in:
parent
61fa783410
commit
72be22b076
@ -34,6 +34,7 @@ const filterIllegalMsg = async ({
|
|||||||
logger,
|
logger,
|
||||||
larkService,
|
larkService,
|
||||||
larkBody,
|
larkBody,
|
||||||
|
app,
|
||||||
}: Context.Data): Promise<boolean> => {
|
}: Context.Data): Promise<boolean> => {
|
||||||
const { chatId, msgType, msgText } = larkBody
|
const { chatId, msgType, msgText } = larkBody
|
||||||
// 没有chatId的消息不处理
|
// 没有chatId的消息不处理
|
||||||
@ -41,7 +42,7 @@ const filterIllegalMsg = async ({
|
|||||||
if (!chatId) return true
|
if (!chatId) return true
|
||||||
|
|
||||||
// 非私聊和群聊中艾特机器人的消息不处理
|
// 非私聊和群聊中艾特机器人的消息不处理
|
||||||
if (!(await getIsP2pOrGroupAtBot(larkBody))) {
|
if (!(await getIsP2pOrGroupAtBot(larkBody, app))) {
|
||||||
return true
|
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}`)
|
logger.info(`got a illegal message, chatId: ${chatId}`)
|
||||||
const content = JSON.stringify({
|
const content = JSON.stringify({
|
||||||
text: "哇!这是什么东东?我只懂普通文本啦![可爱]",
|
text: "哇!这是什么东东?我只懂普通文本啦![可爱]",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user