Skip to content

Commit 11487a7

Browse files
Guillermo Alejandro Gallardo DiezGuillermo Alejandro Gallardo Diez
authored andcommitted
fix: minor comments
1 parent 24284d9 commit 11487a7

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/bridge/effect_adapter.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,23 @@ impl EffectBridgeAdapter {
364364
let list: Vec<serde_json::Value> = missions
365365
.iter()
366366
.map(|m| {
367+
let timezone =
368+
if let ironclaw_engine::types::mission::MissionCadence::Cron {
369+
timezone: Some(tz),
370+
..
371+
} = &m.cadence
372+
{
373+
serde_json::Value::String(tz.to_string())
374+
} else {
375+
serde_json::Value::Null
376+
};
367377
serde_json::json!({
368378
"id": m.id.to_string(),
369379
"name": m.name,
370380
"goal": m.goal,
371381
"status": format!("{:?}", m.status),
372382
"cadence": cadence_to_round_trip_string(&m.cadence),
383+
"timezone": timezone,
373384
"threads": m.thread_history.len(),
374385
"current_focus": m.current_focus,
375386
"notify_channels": m.notify_channels,
@@ -1155,7 +1166,9 @@ fn parse_cadence(
11551166
// Expected format: event:<channel>:<pattern>
11561167
// Split on first ':' after the channel name.
11571168
let (channel, pattern) = match rest.split_once(':') {
1158-
Some((ch, pat)) if !ch.is_empty() && !pat.is_empty() => (ch, pat),
1169+
Some((ch, pat)) if !ch.trim().is_empty() && !pat.trim().is_empty() => {
1170+
(ch.trim(), pat.trim())
1171+
}
11591172
_ => {
11601173
return Err(concat!(
11611174
"event cadence requires 'event:<channel>:<pattern>', ",

0 commit comments

Comments
 (0)