Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/zulip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,16 @@ async fn handle_command<'a>(
continue;
};

// Skip @**triagebot**
let cmd_index = cmd_index + 1;

// Error on unexpected end-of-line
if cmd_index >= words.len() {
return Ok(Some(
"Error parsing command: unexpected end-of-line".to_string(),
));
}

let cmd = parse_cli::<StreamCommand, _>(words[cmd_index..].iter().copied())?;
tracing::info!("command parsed to {cmd:?}");

Expand Down
Loading