Skip to content

Commit ae7faea

Browse files
committed
--address_book_alias
1 parent b525185 commit ae7faea

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/core_main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,14 @@ pub fn core_main() -> Option<Vec<String>> {
490490
if pos < max {
491491
address_book_tag = Some(args[pos + 1].to_owned());
492492
}
493+
let mut address_book_alias = None;
494+
let pos = args
495+
.iter()
496+
.position(|x| x == "--address_book_alias")
497+
.unwrap_or(max);
498+
if pos < max {
499+
address_book_alias = Some(args[pos + 1].to_owned());
500+
}
493501
let mut device_group_name = None;
494502
let pos = args
495503
.iter()
@@ -523,6 +531,9 @@ pub fn core_main() -> Option<Vec<String>> {
523531
if let Some(name) = address_book_tag {
524532
body["address_book_tag"] = serde_json::json!(name);
525533
}
534+
if let Some(name) = address_book_alias {
535+
body["address_book_alias"] = serde_json::json!(name);
536+
}
526537
}
527538
if let Some(name) = device_group_name {
528539
body["device_group_name"] = serde_json::json!(name);

0 commit comments

Comments
 (0)