Skip to content

Commit

Permalink
allow host "all"
Browse files Browse the repository at this point in the history
  • Loading branch information
digizeph committed Oct 16, 2024
1 parent b354f33 commit 0c3cb95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ fn main() {
connect(url.as_str()).expect("Can't connect to RIS Live websocket server");

let mut subscribe_msg = RisSubscribe::new();
subscribe_msg.host = Some(opts.host.clone());
if opts.host == "all" {
subscribe_msg.host = None;
} else {
subscribe_msg.host = Some(opts.host.clone());
}
if let Some(msg_type) = &opts.msg_type {
subscribe_msg.data_type = match msg_type.as_str() {
"UPDATE" => Some(RisSubscribeType::UPDATE),
Expand Down

0 comments on commit 0c3cb95

Please sign in to comment.