From 08ca34397261980f81d07c6f88ca73e0b1a74916 Mon Sep 17 00:00:00 2001 From: viettranx Date: Mon, 9 Mar 2026 09:44:45 +0700 Subject: [PATCH] fix(cron): deliver agent response instead of raw payload message --- cmd/gateway_cron.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/gateway_cron.go b/cmd/gateway_cron.go index feeab4a3..9e157597 100644 --- a/cmd/gateway_cron.go +++ b/cmd/gateway_cron.go @@ -62,13 +62,12 @@ func makeCronJobHandler(sched *scheduler.Scheduler, msgBus *bus.MessageBus, cfg result := outcome.Result - // If job wants delivery to a channel, send the cron reminder message - // directly (not the agent response) so it appears as a bot notification. + // If job wants delivery to a channel, send the agent response to the target chat. if job.Payload.Deliver && job.Payload.Channel != "" && job.Payload.To != "" { outMsg := bus.OutboundMessage{ Channel: job.Payload.Channel, ChatID: job.Payload.To, - Content: job.Payload.Message, + Content: result.Content, } if peerKind == "group" { outMsg.Metadata = map[string]string{"group_id": job.Payload.To}