File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ async fn handle_command<'a>(
179
179
message_data : & ' a Message ,
180
180
) -> anyhow:: Result < Option < String > > {
181
181
log:: trace!( "handling zulip command {:?}" , command) ;
182
- let words: Vec < & str > = command. split_whitespace ( ) . collect ( ) ;
182
+ let mut words: Vec < & str > = command. split_whitespace ( ) . collect ( ) ;
183
183
184
184
// Missing stream means that this is a direct message
185
185
if message_data. stream_id . is_none ( ) {
@@ -200,6 +200,9 @@ async fn handle_command<'a>(
200
200
impersonated = true ;
201
201
gh_id = impersonated_gh_id;
202
202
}
203
+
204
+ // Skip the first two arguments for the rest of CLI parsing
205
+ words = words[ 2 ..] . iter ( ) . copied ( ) . collect ( ) ;
203
206
} else {
204
207
return Err ( anyhow:: anyhow!(
205
208
"Failed to parse command; expected `as <username> <command...>`."
You can’t perform that action at this time.
0 commit comments