feat: 移除冗余的ID消息发送逻辑,改为统一使用更新或回复消息的方法

This commit is contained in:
zhaoyingbo 2025-01-28 13:14:13 +00:00
parent e695a5836c
commit 15fe7e7dce

View File

@ -49,20 +49,6 @@ const filterIllegalMsg = async (ctx: Context): Promise<boolean> => {
return true return true
} }
/**
* ID消息
* @param {Context} ctx -
*/
const manageIdMsg = ({
larkBody: { chatId },
larkCard,
larkService,
}: Context) =>
larkService.message.sendCard2Chat(
chatId,
larkCard.genTempCard("chatId", { chat_id: chatId })
)
/** /**
* *
* @param {Context} ctx - * @param {Context} ctx -
@ -99,7 +85,9 @@ const manageIntent = async (ctx: Context) => {
if (intentAgent.isBaseIntent(intentRes)) { if (intentAgent.isBaseIntent(intentRes)) {
switch (intentRes.intent) { switch (intentRes.intent) {
case 1: case 1:
await manageIdMsg(ctx) await message.updateOrReply(
larkCard.genTempCard("chatId", { chat_id: chatId }) as string
)
break break
case 2: case 2:
await attachService.ciMonitor(chatId) await attachService.ciMonitor(chatId)