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}