fix(group-agent): 时间选择器返回
This commit is contained in:
parent
d64d6211c0
commit
f7fe14e6b1
@ -63,7 +63,7 @@ const genFunctionSelector = (
|
||||
* 生成时间范围选择器
|
||||
* @param ctx - 上下文数据,包含body和larkService
|
||||
*/
|
||||
const genTimeScopeSelector = async (
|
||||
const genTimeScopeSelector = (
|
||||
{ larkCard }: Context.Data,
|
||||
commonVal: Record<string, any> = {}
|
||||
) => {
|
||||
@ -344,8 +344,9 @@ const manageActionMsg = async (ctx: Context.Data) => {
|
||||
mentions,
|
||||
})
|
||||
}
|
||||
|
||||
// 判断是否需要返回时间范围选择器
|
||||
if (!timeScope || !startTime || !endTime) {
|
||||
if (!(timeScope || (startTime && endTime))) {
|
||||
return genTimeScopeSelector(ctx, {
|
||||
chatId,
|
||||
chatName,
|
||||
@ -354,6 +355,7 @@ const manageActionMsg = async (ctx: Context.Data) => {
|
||||
mentions,
|
||||
})
|
||||
}
|
||||
|
||||
// 设置齐全,返回结果报告
|
||||
sendGroupReport(ctx, messageId, {
|
||||
chatId,
|
||||
|
@ -2,4 +2,4 @@
|
||||
POST http://localhost:3000/bot?app=egg
|
||||
Content-Type: application/json
|
||||
|
||||
{"schema":"2.0","header":{"event_id":"c0aed3b0911e18e8b941746256e8d4ce","token":"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj","create_time":"1728979404867","event_type":"im.message.receive_v1","tenant_key":"2ee61fe50f4f1657","app_id":"cli_a1eff35b43b89063"},"event":{"message":{"chat_id":"oc_8c789ce8f4ecc6695bb63ca6ec4c61ea","chat_type":"group","content":"{\"text\":\"@_user_1 /groupchat @_user_2 你好\"}","create_time":"1728979404353","mentions":[{"id":{"open_id":"ou_032f507d08f9a7f28b042fcd086daef5","union_id":"on_7111660fddd8302ce47bf1999147c011","user_id":""},"key":"@_user_1","name":"小煎蛋","tenant_key":"2ee61fe50f4f1657"},{"id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"key":"@_user_2","name":"赵英博","tenant_key":"2ee61fe50f4f1657"}],"message_id":"om_17492a15fdc15b3a0fda31352dae49dc","message_type":"text"},"sender":{"sender_id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"sender_type":"user","tenant_key":"2ee61fe50f4f1657"}}}
|
||||
{"schema":"2.0","header":{"event_id":"0c250522d3832abc044649e03672effd","token":"tV9djUKSjzVnekV7xTg2Od06NFTcsBnj","create_time":"1729082026035","event_type":"im.message.receive_v1","tenant_key":"2ee61fe50f4f1657","app_id":"cli_a1eff35b43b89063"},"event":{"message":{"chat_id":"oc_ba33dc55b3dd76bf31e0adfec5e13300","chat_type":"p2p","content":"{\"text\":\"/groupchat 前端群说了什么\"}","create_time":"1729082025875","message_id":"om_eba008b10c29ac96d9c1e6e9baf22286","message_type":"text"},"sender":{"sender_id":{"open_id":"ou_470ac13b8b50fc472d9d8ee71e03de26","union_id":"on_9dacc59a539023df8b168492f5e5433c","user_id":"zhaoyingbo"},"sender_type":"user","tenant_key":"2ee61fe50f4f1657"}}}
|
Loading…
x
Reference in New Issue
Block a user