fix(action): 增加消息处理的延时
All checks were successful
Egg Server MIflow / build-image (push) Successful in 48s

This commit is contained in:
zhaoyingbo 2024-09-26 08:59:49 +00:00
parent d5e8755886
commit da5760800f

View File

@ -5,6 +5,7 @@ import {
getMessageId,
LarkAction,
} from "@egg/lark-msg-tool"
import { sleep } from "bun"
import { Context } from "../../../types"
import llm from "../../../utils/llm"
@ -102,6 +103,7 @@ const sendTimeScopeSelector = async (ctx: Context.Data) => {
logger.error(`Invalid chatName or chatId: ${JSON.stringify(value)}`)
return
}
await sleep(1000)
larkService.message.updateTemp(
getMessageId(body),
CardTemplate.timeScopeSelector,
@ -129,6 +131,7 @@ const manageGroupMsg = async (ctx: Context.Data) => {
logger.error(`Invalid value: ${JSON.stringify(value)}`)
return
}
await sleep(1000)
// 发送一个loading的消息
await larkService.message.updateTemp(
getMessageId(body),