feat: 移除冗余的ID消息发送逻辑,改为统一使用更新或回复消息的方法
This commit is contained in:
parent
e695a5836c
commit
15fe7e7dce
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user